码迷,mamicode.com
首页 > 数据库 > 详细

mysql 导入sqlserver数据库

时间:2016-06-08 14:06:19      阅读:235      评论:0      收藏:0      [点我收藏+]

标签:

#mysql 导入sqlserver数据库

EXEC
master.dbo.sp_addlinkedserver @server = Nsjkxb00, @srvproduct=NMySQL, @provider=NMSDASQL, @provstr=NDRIVER={MySQL ODBC 5.3 Unicode Driver}; SERVER=localhost; _DATABASE=tigerdb; USER=root; PASSWORD=123456; OPTION=3 --数据导入到 loreal 数据库中 --cast(null as bigint) as Id select identity(bigint,1,1) as Id,* into loreal.dbo.Comments from openquery(sjkxb00, SELECT * FROM loreal.t_comment_5927833634809674453) --数据导入到 wmm 数据库中 select -- top 5 * identity(bigint,1,1) as Id,* into wmn.dbo.t_lable_groupwmm from openquery(sjkxb00, SELECT * FROM wmn.t_lable_groupwmn) select -- top 5 * identity(bigint,1,1) as Id,* into wmn.dbo.w_user_info_wmm from openquery(sjkxb00, SELECT * FROM wmn.w_user_info_wmn) --数据导入到 bbqne 数据库中--未插入 select * from openquery(sjkxb00, SELECT * FROM bbqne.t_dpt_203) select top 10 * from openquery(sjkxb00, SELECT * FROM bbqne.t_lable_group203)--要把mysql中char()修改为varchar() select * from openquery(sjkxb00, SELECT * FROM bbqne.w_user_info_203)

 

mysql 导入sqlserver数据库

标签:

原文地址:http://www.cnblogs.com/whaozl/p/5569767.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!