Difference Analysis of mysql mssql

Source: Internet
Author: User

This article first compares the difference between mssql and mysql, and then compares them with examples.

1. mysql supports enum, set, and SQL server.

2 mysql does not support nchar, nvarchar, and ntext

3. the incremental Statement of mysql is AUTO_INCREMENT, while that of mssql is identity)

4 msms by default, the default value of the statement for creating a table everywhere is (0), but it is not allowed to contain square brackets in mysql.

5 mysql needs to specify the storage type for the table

6. The mssql identifier is [] and [type], indicating that it is different from the keyword, but mysql is ', that is, the symbol on the left of key 1.

7. mssql supports the getdate () method to obtain the current time and date. However, mysql supports Date and Time types. The current date is cur_date (), and the current complete time is the now () function.

8 mssql does not support replace into statements, but in the latest sql20008, it also supports merge syntax

9 mysql supports insert into table1 set t1 = '', t2 ='', but mssql does not support this write.

10 mysql supports insert into tabl1 values)

11 mssql does not support limit statements. Unfortunately, it can only replace limt 0, N, row_number () over () with the top function to replace limit N, M

12 when creating a table, mysql must specify a storage engine type for each table, while mssql only supports one storage engine.

13 mysql does not support the datetime type whose default value is the current time (mssql is easy to implement). in mysql, the timestamp type is used.

14. Check whether the table exists in mssql and delete it again. You need:

If exists (select * from dbo. sysobjects where id = object_id (N 'uc _ newpm ') and OBJECTPROPERTY (id, N 'isusertable') = 1)

However, in mysql, you only need to drop table if exists cdb_forums;

15 mysql supports unsigned integers, so it can store up to twice the maximum number of unsigned mssql statements.

16 mysql does not support the varchar (max) type that is very convenient in mssql. This type can be used in both general data storage and blob Data Storage in mssql.

17 to create a non-clustered index in mysql, you only need to specify it as the key when creating the table. For example, KEY displayorder (fid, displayorder) must be: create unique nonclustered index index_uc_protectedmembers_username_appid on dbo. uc_protectedmembers

(Username asc, appid asc)

18 The mysql text field type cannot have default values

The total field length of a table in 19mysql cannot exceed 65XXX.

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.


1. MySQL supports enum, set, and SQL Server.

2 MySQL does not support nchar, nvarchar, and ntext

3. the incremental Statement of MySQL is AUTO_INCREMENT, while that of ms SQL is identity)

4 ms SQL by default, the default value of the everywhere table creation statement is (0), and in MySQL it is not allowed with parentheses

5 MySQL needs to specify the storage type for the table

6 ms SQL identifier is [], [type], it is different from the keyword, but MySQL is ', that is, the symbol on the left of the key 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, get the current date is cur_date (), the current complete time is now () function

8 ms SQL does not support replace into statements, but in the latest sql20008, also supports merge syntax

9 MySQL supports insert into table1 set t1 = '', t2 ='', but ms SQL does not support this write.

10 MySQL supports insert into tabl1 values)

11 ms SQL does not support the limit statement, is very sorry, can only replace limt 0, N, row_number () over () function instead of limit N, M

12 when creating a table, MySQL must specify a storage engine type for each 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 it is the timestamp type

14 ms SQL inside check whether there is this table and then delete, need to be like this:

If exists (select * from dbo. sysobjects
Where id = object_id (n'uc _ newpm ') and OBJECTPROPERTY (id, n'isusertable') = 1)
However, in MySQL, you only need to drop table if exists cdb_forums;
15 MySQL supports unsigned integers, so it can store up to twice the maximum number of unsigned ms SQL statements.

16 MySQL does not support the varchar (max) type that is very convenient in ms SQL. This type can be used in ms SQL to store both general data and blob data.

17 to create a non-clustered index in MySQL, you only need to specify it as the key when creating the table. For example, KEY displayorder (fid, displayorder) must be:

Create unique nonclustered index
Index_uc_protectedmembers_username_appid on dbo. uc_protectedmembers
(Username asc, appid asc)
18 The MySQL text field type cannot have default values

The total field length of a table in 19MySQL cannot exceed 65XXX.

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 ms SQL.

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

24php connects to MySQL and ms SQL in similar ways. You only need to replace the MySQL of the function with ms SQL.

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

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.