How to convert mssql script to mysql
mysql, sql, sql-server
Solution
You don't just "convert" TSQL to SQL code for MySQL. You need to know the different datatypes, column constraints, etc. You hit the first of many roadblocks: MySQL uses AUTO_INCREMENT instead of SQL Server's IDENTITY field constraint.
EDIT: There are utilities, but you should still understand what the changes are, as they'll affect many things (including performance and future development against the DB). Duplicate of several other posts (dead link removed).
Problem
I tried to convert script from MS SQL Server to MySql. I couldn't find any convenience approach to do this conversion. I tried this MS SQL Server to MySQL Conversion online converter but it has a lot of mistakes at syntax. ``` ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IDENTITY(1,1) NOT NULL, `address` varchar(255) NOT NULL, `date_added` datetime N' at line 2 ``` Here is content of the file that I need to convert pastebin - script - Does any better way to make this conversion but without installing special tool exist?