Basic differences between MySQL statements and SQL statements

Source: Internet
Author: User
Tags mysql text

1. MySQL supports enum and set types, SQL Server does not support;2. MySQL does not support nchar,nvarchar, ntext type;3. The increment statement for the MySQL database is auto_increment, while MS SQL is the identity (1,1);4. The default value for MS SQL default Everywhere table creation statements is ((0) , and in MySQL is not allowed with two brackets;5. MySQL needs to specify the storage type for the table;6. The MS SQL identifier is[],[type]It means that he is different from the keyword, but MySQL is ', that is, 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 in the latest SQL Server 2008, the merge syntax is also supported;9. MySQL Database supports insert intoTable1SetT1=", T2=", but MS SQL does not support such writing;Ten. MySQL supports insert intoTabl1Values(1,1), (1,1), (1,1), (1,1), (1,1), (1,1), (1,1) One. MS SQL does not support the limit statement, it is very regrettable, can only use top instead of LIMT0, N,row_number () Over() function instead of limit n,m; A. MySQL Specifies a storage engine type for each table when the table is created, whereas MS SQL supports only one storage engine; -. MySQL does not support the default value for the current time datetime type (MS SQL is easy to do), in MySQL is used timestamp type; -. MS SQL inside check whether there is this table and then delete, need this:if exists(Select *  fromDbo.sysobjectswhereId= object_id(N'uc_newpm') and ObjectProperty(Id,n'isusertable')=1but in MySQL, it only takesDROP TABLE IF EXISTScdb_forums; the. MySQL supports unsigned integers, then the maximum number of storage is one-fold more than MS SQL, which does not support unsigned type; -. MySQL does not support the use of very convenient varchar in MS SQL (Maxtype, this type in MS SQL can do both general data storage, also can do BLOB data storage; -. The MySQL database creates a nonclustered index that only needs to be specified as key when creating the table, such as:KEYDisplayorder (Fid,displayorder) must be in MS sql:Create Unique nonclustered IndexIndex_uc_protectedmembers_username_appid onDbo.uc_protectedmembers (usernameASC, AppIDASC)  -. MySQL text field type does not allow default values; +. The total field length of a table in MySQL does not exceed 65XXX.  -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 .... +. MySQL management tools have a few good, mysql_front and the official that suite, but none of the ease of use of ssms, which is a big drawback of MySQL.  A. The MySQL stored procedure only appears in the latest version, and the stability and performance may not be as good as Ms SQL.  atthe same load pressure, MySQL to consume less CPU and memory, MS SQL is really very resource-consuming; -PHP connects MySQL database and 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.

Basic differences between MySQL statements and SQL statements

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.