Differences between MySQL database data types and SQL Server database data types

Source: Internet
Author: User
Tags mysql text time and date

1. mysql supports enum and set types, SQL Server does not support;
2. mysql does not support nchar, nvarchar, ntext types;
3. mysql database increment statement is auto_increment, and MS SQL is identity (all);
4. MS SQL defaults to the default value of the table creation statement is ((0)), and in MySQL is not allowed with two brackets;
5. mysql needs to specify the storage type for the table;
6. MS SQL identifier [],[type] means that he is different from the keyword, but MySQL is ', that is, the key to 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 full time is now () function;
8. MS SQL does not support the replace into statement, but in the latest SQL Server 2008, the merge syntax is also supported;
9. mysql database support INSERT INTO table1 set t1 = ", t2 =", but MS SQL does not support this write;
MySQL support insert into TABL1 values (+), (max), (max), (+), (max), (max)
MS SQL does not support the limit statement, it is very regrettable, can only use top instead of LIMT 0,n,row_number () over () function to replace the limit n,m;
MySQL. When you create a table, you specify a storage engine type for each table, and MS SQL supports only one storage engine;
MySQL does not support a datetime type with the default value of the current time (MS SQL is easy to do), and in MySQL it is used with the timestamp type;
MS SQL inside check to see if this table is deleted again, you need this:

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

In MySQL, however, only the DROP TABLE IF EXISTS cdb_forums is required;
MySQL supports unsigned integers, which can be stored a maximum of one more times than 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.
The MySQL database creates a nonclustered index that only needs to be specified as key when creating the table, for example: Key Displayorder (Fid,displayorder)
In MS SQL, you must:
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 MySQL is not more than 65XXX.
20. A very superficial difference is that MySQL installation is particularly simple, and the file size is 110M (non-installed version), compared to the giant of Microsoft, the installation progress is simply ....
The MySQL management tool has several good, mysql_front and official that kit, but none of SSMs's ease of use, which is a big drawback of MySQL.
MySQL's stored procedures only appear in the latest version, 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-intensive;
PHP connects MySQL database with MS SQL in the same way, just to replace the function of MySQL with MS SQL.
MySQL supports the date,time,year type, and MS SQL to 2008 supports date and time.

Differences between MySQL database data types and SQL Server database data types

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.