Difference between MS SQL Server and MySQL

1 MySQL supports enum, and set types, SQL Server does not support
2 MySQL does not support nchar, nvarchar, ntext types
3 MySQL's incremental statement is AUTO_INCREMENT, while MS SQL is identity(1,1)
4 MS SQL defaults to the default value of the table creation statement everywhere ((0)), while in MySQL, double brackets are not allowed
5 MySQL needs to specify the storage type for the table
6 MS SQL identifier is [], [type] which means it is different from keywords, but MySQL is `, which is the symbol to the left of button 1
7 MS SQL supports the getdate() method to get the current time and date, but MySQL can be divided into date type and time type, the current date is cur_date(), and the current full time is the now() function
8 MS SQL does not support replace into statement, but in the latest sql20008, it also supports merge syntax
9 MySQL supports insert into table1 set t1 = '', t2 = '' , but MS SQL does not support this
10 MySQL supports insert into tabl1 values ​​(1,1), (1,1), (1,1), (1,1), (1,1), (1,1), (1,1)
11 MS SQL does not support the limit statement, which is very regrettable. Only top can be used to replace limit 0,N, and row_number() over() function can replace limit N,M
12 MySQL specifies a storage engine type for each table when creating a table, while MS SQL only supports one storage engine
13 MySQL does not support the datetime type whose default value is the current time (MS SQL is easy to do), in MySQL, the timestamp type is used
14 In MS SQL, check whether there is this table and then delete it, you need this:
if exists (select *   from   dbo.sysobjects   where  id = object_id(N'uc_newpm') and OBJECTPROPERTY(id,N'IsUserTable')=1)但是在MySQL里面只需要 DROP TABLE IF EXISTS cdb_forums;
 
 
15 MySQL supports unsigned integers, so it can store twice the maximum number than MS SQL that does not support unsigned integers
16 MySQL does not support the very convenient varchar(max) type used in MS SQL. This type can be used for both general data storage and blob data storage in MS SQL.
17 To create a non-clustered index in MySQL, you only need to specify the key when creating the table, for example: KEY displayorder (fid, displayorder) In MS SQL, you must:
create unique nonclustered indexindex_uc_protectedmembers_username_appid on dbo.uc_protectedmembers(username asc,appid asc)
 
18 MySQL text field type is not allowed to have default value
19 The total field length of a table in MySQL does not exceed 65XXX.
20 A very superficial difference is that the installation of MySQL is very simple, and the file size is only 110M (non-installation version), compared to the behemoth Microsoft, the installation progress is simply......
21 There are several better management tools for MySQL, MySQL_front, and the official suite, but none of them are as easy to use as SSMS, which is a big disadvantage of MySQL.
22 MySQL's stored procedures only appear in the latest version, and the stability and performance may not be as good as MS SQL.
23 Under the same load pressure, MySQL consumes less CPU and memory, and MS SQL is indeed very resource-intensive.
The way 24php connects to MySQL and MS SQL is similar, just replace the function's MySQL with MS SQL.
25MySQL supports date, time, year types, MS SQL only supports date and time until 2008.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326418735&siteId=291194637