Mssql to mysql _ MySQL

Source: Internet
Author: User
Mssql converts mysql to bitsCN.com.

Mysterious little strong & 1943

1. table structure

Use MySQL to generate the create script. Find the script to be exported and modify the column structure of the table created in the MySQL database according to the MySQL syntax.

2. export table data

Use bcp on MSSQL to export text files:

Bcp "SELECT * FROM dbname. dbo. tablename;" queryout tablename.txt-c-Slocalhostdb2005-Usa

"" Indicates the SQL statement to be exported.-c indicates that fields are separated and records are separated.-S indicates the database server and instance, and-U indicates the user name, -P specifies the password.

Use mysqlimport on MySQL to import text files to the corresponding table

Mysqlimport-uroot-p databasename/home/test/tablename.txt

-U indicates the user name,-p indicates the password, and databasename indicates the database name. The table name is the same as the file name.

BitsCN.com

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.