Sudarsono Sung
Sudarsono Sung

Reputation: 83

Export MSSQL table records to MySQL in .sql file

i've a MSSQL database and trying to migrate to MySQL database.. the problem is when I using MySQL WorkBench, some table records in my MSSQL database is not migrated (there is an error and MySQL Workbench not responding).. is there any tools to export MSSQL table records into SQL file that compatible to be executed in MySQL?

Upvotes: 0

Views: 8101

Answers (1)

gotqn
gotqn

Reputation: 43666

Both T-SQL and MySQL and support VALUES clause. So, right click on the database and select Generate scripts from Tasks:

enter image description here

Then you can choose objects:

enter image description here

and then make sure you have selected to get the data, too:

enter image description here

You can even get the schema and change it a little bit to match the MySQL syntax.

For small amount of data this is pretty cool. If you are exporting large tables it will be better to use another tool. For example, using bcp you can export your data in CSV format and then import it in the MySQL database.

Upvotes: 2

Related Questions