• CONCAT()  or CHAR()  with one argument or more than two arguments. (In MySQL Server, these functions can take a variable number of arguments.) 

•The BIT_COUNT() , CASE , ELT() , FROM_DAYS() , FORMAT() , IF() , MD5() , PERIOD_ADD() , PERIOD_DIFF() , TO_DAYS() , and WEEKDAY()  functions. 

•Use of TRIM()  to trim substrings. Standard SQL supports removal of single characters only. 

•The GROUP BY  functions STD() , BIT_OR() , BIT_AND() , BIT_XOR() , and GROUP_CONCAT() . See Section 12.20, “Aggregate Functions” . 

## 1.7.2 MySQL Differences from Standard SQL 

We try to make MySQL Server follow the ANSI SQL standard and the ODBC SQL standard, but MySQL Server performs operations differently in some cases: 

•There are several differences between the MySQL and standard SQL privilege systems. For example, in MySQL, privileges for a table are not automatically revoked when you delete a table. You must explicitly issue a REVOKE  statement to revoke privileges for a table. For more information, see Section 13.7.1.8, “REVOKE Statement” . 

•The CAST()  function does not support cast to REAL  or BIGINT . See Section 12.11, “Cast Functions and Operators” . 

## 1.7.2.1 SELECT INTO TABLE Differences 

MySQL Server doesn’t support the SELECT ... INTO TABLE  Sybase SQL extension. Instead, MySQL Server supports the INSERT INTO ... SELECT  standard SQL syntax, which is basically the same thing. See Section 13.2.6.1, “INSERT ... SELECT Statement” . For example: 

INSERT INTO tbl_temp2 (fld_id) SELECT tbl_temp1.fld_order_id FROM tbl_temp1 WHERE tbl_temp1.fld_order_id > 100; 

Alternatively, you can use SELECT ... INTO OUTFILE  or CREATE TABLE ... SELECT . 

You can use SELECT ... INTO  with user-defined variables. The same syntax can also be used inside stored routines using cursors and local variables. See Section 13.2.10.1, “SELECT ... INTO Statement” . 

## 1.7.2.2 UPDATE Differences 

If you access a column from the table to be updated in an expression, UPDATE  uses the current value of the column. The second assignment in the following statement sets col2  to the current (updated) col1 value, not the original col1  value. The result is that col1  and col2  have the same value. This behavior differs from standard SQL. 

## 1.7.2.3 FOREIGN KEY Constraint Differences 

UPDATE t1 SET col1 = col1 + 1, col2 = col1; 

The MySQL implementation of foreign key constraints differs from the SQL standard in the following key respects: 

•If there are several rows in the parent table with the same referenced key value, InnoDB  performs a foreign key check as if the other parent rows with the same key value do not exist. For example, if you 

