#MySQL Server supports extensions that may not be found in other SQL databases. This means that if these extensions to MySQL are used, the code cannot be ported to other SQL servers. But sometimes, it's portable.
Let's understand MySQL's extensions to standard SQL -
Strings can be enclosed by " (double quotes) or ' (single quotes) by default. If "ANSI_QUOTES" SQL mode is turned on, the string must be enclosed in ', if " (double quotes) are used, the server will interpret it as an identifier.
\ is the escape character for strings.
MySQL does not support table spaces, that is, using the database name and table name (such as "database_name.table_name") to access the table.
When using the "group by" clause to select all selected columns, you do not need to specify a name for them. This ensures better performance on certain queries.
The "ORDER BY" clause cannot be specified with the "GROUP BY" clause, but "ASC" and "DESC" can be specified with the "GROUP BY" clause.
The '||' and '&&' operators can be used to indicate logical 'OR' and 'AND' operations respectively when using MySQL server. This is because, '|| " are synonymous with "OR", "&&" and "AND".
MySQL server does not support the standard SQL operator "|". |' connection string. To do this, The "CONCAT" function can be used.
The above is the detailed content of MySQL extensions to standard SQL. For more information, please follow other related articles on the PHP Chinese website!