whaozl
#mysql 导入sqlserver数据库

EXEC
master.dbo.sp_addlinkedserver @server = N\'sjkxb00\', @srvproduct=N\'MySQL\', @provider=N\'MSDASQL\', @provstr=N\'DRIVER={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\')

 

分类:

技术点:

相关文章:

  • 2021-08-16
  • 2021-08-16
  • 2021-12-08
  • 2021-04-19
  • 2021-11-08
  • 2021-09-30
  • 2022-01-07
猜你喜欢
  • 2021-12-22
  • 2021-07-18
  • 2021-08-16
  • 2021-10-17
  • 2021-12-22
  • 2021-12-22
  • 2021-08-16
相关资源
相似解决方案