1. identity(1,1) -> auto_increment;
2. datetime -> timestamp
3. default getdate() -> default now()
4. rid of "[]"
5. change sql comment "--" to "#"
6. default value if in (), should rid of '()';
7. replace "go" with ";"
8. rid of "On primary"
9. change:
PRIMARY KEY CLUSTERED
(
Item_ID
) ON PRIMARY
to
primary key(item_id)
10. rid of " COLLATE Chinese_PRC_CI_AS"
11. year_month is a reserved word, should be changed to yearmonth;
after change all sql from mssql to mysql and create tables in mysql. u can use DTS to transfer data from mssql to mysql easily, and what's more, u can insert value into mysql's identity column with no change.