I am close at the job of converting MSSQL into mysql. I have summarized some experiences and shared them with you.
At the same time, these will be constantly updated. I hope you can add more information.
1 MySQLSupportedEnum,AndSetType,SQL ServerNot Supported
2 MySQLNot SupportedNchar, nvarchar, ntextType
3 MySQLThe incremental statement isAuto_increment, AndMSSQLYesIdentity (1, 1)
4 msmsBy default, the default value of the statement for creating a table everywhere is(0 )),InMySQLIt cannot contain two parentheses.
5. MySQLYou must specify the storage type for the table.
6 MSSQLThe identifier is[], [Type]It indicates that he is different from the keyword,MySQLHowever', That is, the button1The symbol on the left
7. MSSQLSupportedGetdate ()Method to obtain the current time and date,MySQLIt can be divided into date type and time type to obtain the current date isCur_date (), The current full time isNow ()Function
8. MSSQLNot SupportedReplaceStatement, but in the latestSql20008It also supportsMergeSyntax
9 MySQLSupportedInsert into Table1 set T1 = '', T2 = '',HoweverMSSQLWriting like this is not supported
10 MySQLSupportedInsert into tabl1 values (1, 1), (1, 1), (1, 1), (1, 1), (1, 1)
11 MSSQLNot SupportedLimitStatement.TopReplaceLimt 0, n,Row_number () over ()Function substitutionLimit n, m
12 MySQLWhen creating a table, you must specify a storage engine type for each table.MSSQLOnly one storage engine is supported.
13 MySQLThe default value is the current time.DatetimeType (MSSQLIt is easy to do), inMySQLIt is usedTimestampType
14. MSSQLCheck whether the table exists and delete it again. You need:
IfExists(Select*FromDBO. sysobjectsWhereId =Object_id(N'Uc _ newpm')AndObjectproperty (ID, n'Isusertable') = 1)
HoweverMySQLOnlyDrop table if exists cdb_forums;
15 MySQLSupports unsigned integers.MSSQLThe maximum storage capacity is doubled.
16 MySQLNot supported inMSSQLIt is very convenient to useVarchar (max)Type.MSSQLIt can be used for both general data storage andBlobData Storage
17 MySQLTo create a non-clustered index, you only need to specifyKeyJust like:Key displayorder (FID, displayorder)InMSSQLIt must be:Create unique nonclustered IndexIndex_uc_protectedmembers_username_appidOnDBO. uc_protectedmembers
(UsernameASC, AppidASC)
18 MySQL textThe field type cannot have default values.
19 MySQLThe total field length of a table cannot exceed65xxx.
20 The obvious difference is that the installation of MySQL is very simple, and the file size is only 110 m (non-installation version). Compared with Microsoft, the installation progress is simply .....
There are several good 21 MySQL management tools, mysql_front, and the official suite, but they are not easy to use SSMs, which is a major disadvantage of MySQL.
22mysql stored procedures only appear in the latest version, and the stability and performance may be inferior to MSSQL.
23 with the same load pressure, MySQL consumes less CPU and memory, while MSSQL does consume a lot of resources.
24php connects to MySQL and MSSQL in similar ways. You only need to replace the MySQL function with MSSQL.
25mysql supports date, time, and year types. Only date and time are supported by MSSQL to 2008.