The difference analysis of MySQL MSSQL

Source: Internet
Author: User
Tags current time datetime getdate mssql mysql create mysql text

1 MySQL supports enum, and set type, SQL Server does not support

2 MySQL does not support nchar,nvarchar,ntext type

3 The incremental statement of MySQL is auto_increment, while MSSQL is identity (1,1)

4 MSMs default values for the table creation statement are ((0)), while in MySQL it is not allowed with two parentheses.

5 MySQL needs to specify the storage type for the table

The 6 MSSQL qualifier is [],[type] means he's different from the keyword, but MySQL is ', that's the symbol on the left of button 1.

7 MSSQL Support GETDATE () method to get the current time date, but MySQL can be divided into date type and time type, get the current date is cur_date (), the current full time is now () function

8 MSSQL does not support the replace into statement, but the merge syntax is also supported in the latest sql20008

9 MySQL supports insert INTO table1 set t1 = ', t2 = ', but MSSQL does not support this write

MySQL supports insert into TABL1 values (1,1), (1,1), (1,1), (1,1), (1,1), (1,1), (1,1)

One MSSQL does not support limit statements, is very regrettable, can only use top replace LIMT 0,n,row_number () over () function to replace limit n,m

MySQL when you create a table, you specify a storage engine type for each table, and MSSQL only supports one storage engine

MySQL does not support the default value of the DateTime type for the current time (MSSQL is easy to do), in MySQL inside is using the timestamp type

MSSQL inside check whether there is this table and then delete, need this:

if exists (SELECT * from dbo.sysobjects WHERE id = object_id (n ' uc_newpm ') and OBJECTPROPERTY (ID, n ' isusertable ') = 1)

But in MySQL only need DROP TABLE IF EXISTS cdb_forums;

MySQL supports unsigned integers, so it can be a maximum of one more than the number of non-unsigned MSSQL storage

MySQL does not support the use of a very convenient varchar (max) type in MSSQL, this type in the MSSQL can do both general data storage, can do BLOB data storage

MySQL Create a nonclustered index only need to specify as key when creating a table, for example: Key Displayorder (Fid,displayorder) in MSSQL must be: Create unique nonclustered index Index_uc_protectedmembers_username_appid on Dbo.uc_protectedmembers

(username asc,appid ASC)

MySQL text field type does not allow default values

The total field length of a table in 19mysql is no more than 65XXX.

201 A very superficial difference is that MySQL installation is particularly simple, and file size is 110M (not installed version), compared to Microsoft this behemoth, installation progress is simply ...

21mysql management tools have a few better, Mysql_front, and the official that suite, but there is no ssms easy to use, which is a big drawback of MySQL.

22mysql stored procedures only appear in the latest releases, and the stability and performance may not be as good as MSSQL.

23 The same load pressure, MySQL to consume less CPU and memory, MSSQL is indeed very resource-consuming.

24php connection MySQL and MSSQL the same way, just want to replace the function of MySQL can be replaced by.


1 MySQL supports enum, and set type, SQL Server does not support

2 MySQL does not support nchar,nvarchar,ntext type

3 The incremental statement for MySQL is auto_increment, while MS SQL is identity (1,1)

4 MS SQL default Everywhere table creation statement default value is ((0)), while in MySQL inside is not allowed with two parentheses

5 MySQL needs to specify the storage type for the table

The 6 MS SQL identifier is [],[type] means he is different from the keyword, but MySQL is ', that's the symbol on the left of button 1.

7 MS SQL supports the GETDATE () method to get the current time date, but MySQL can be divided into date type and time type, get the current date is cur_date (), the current full time is now () function

8 MS SQL does not support the replace into statement, but the merge syntax is also supported in the latest sql20008

9 MySQL supports insert INTO table1 set t1 = ', t2 = ', but MS SQL does not support this write

MySQL supports insert into TABL1 values (1,1), (1,1), (1,1), (1,1), (1,1), (1,1), (1,1)

One MS SQL does not support limit statements, is very regrettable, can only use top replace LIMT 0,n,row_number () over () function to replace limit n,m

MySQL when you create a table, you specify a storage engine type for each table, while MS SQL supports only one storage engine

MySQL does not support the default value of the DateTime type for the current time (MS SQL is easy to do), in MySQL inside is using the timestamp type

MS SQL Check whether there is this table to delete again, need this:

if exists (SELECT * from dbo.sysobjects
WHERE id = object_id (N ' uc_newpm ') and OBJECTPROPERTY (Id,n ' isusertable ') =1)
But in MySQL only need DROP TABLE IF EXISTS cdb_forums;
MySQL supports unsigned integers, and can save up to one more than the maximum number of bytes of MS SQL that does not support unsigned type

MySQL does not support the use of a very convenient varchar (max) type in MS SQL, which can be used for both general data storage and BLOB data storage in MS SQL

MySQL creating a nonclustered index only needs to be specified as key when creating a table, for example: Key Displayorder (Fid,displayorder) must be in MS SQL:

Create unique nonclustered index
Index_uc_protectedmembers_username_appid on Dbo.uc_protectedmembers
(username asc,appid ASC)
MySQL text field type does not allow default values

The total field length of a table in 19MySQL is no more than 65XXX.

201 A very superficial difference is that MySQL installation is particularly simple, and file size is 110M (not installed version), compared to Microsoft this behemoth, installation progress is simply ...

21MySQL management tools have a few better, Mysql_front, and the official that suite, but there is no ssms easy to use, which is a big drawback of MySQL.

22MySQL stored procedures only appear in the latest releases, and the stability and performance may not be as good as Ms SQL.

23 The same load pressure, MySQL to consume less CPU and memory, MS SQL is indeed very resource-consuming.

24php to connect MySQL and MS SQL in the same way, just want to replace the function of MySQL with MS SQL can be.

25MySQL supports date,time,year type, MS SQL to 2008 to support date and time

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.