MySQL Import SQL Server database

Source: Internet
Author: User
Tags mysql import

#MySQL import SQL Server database

EXECMaster.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'--data import into the Loreal database--cast (null as bigint) as IdSelect Identity(bigint,1,1) asId* intoLoreal.dbo.Comments from OpenQuery(Sjkxb00,'SELECT * from loreal.t_comment_5927833634809674453')--data import into the WMM databaseSelect--Top 5 * Identity(bigint,1,1) asId* intoWMN.DBO.T_LABLE_GROUPWMM from OpenQuery(Sjkxb00,'SELECT * from Wmn.t_lable_groupwmn')Select--Top 5 * Identity(bigint,1,1) asId* intoWMN.DBO.W_USER_INFO_WMM from OpenQuery(Sjkxb00,'SELECT * from Wmn.w_user_info_wmn')--data import into the Bbqne database--not insertedSelect * from OpenQuery(Sjkxb00,'SELECT * from bbqne.t_dpt_203')Select Top Ten * from OpenQuery(Sjkxb00,'SELECT * from bbqne.t_lable_group203')--to change the char () in MySQL to varchar ()Select * from OpenQuery(Sjkxb00,'SELECT * from bbqne.w_user_info_203')

MySQL Import SQL Server database

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.