How can I see the specific value of the sql_mode?
mysql
Solution
It's only blank for you because you have not set the sql_mode. If you set it, then that query will show you the details:
mysql> SELECT @@sql_mode;
+------------+
| @@sql_mode |
+------------+
| |
+------------+
1 row in set (0.00 sec)
mysql> set sql_mode=ORACLE;
Query OK, 0 rows affected (0.00 sec)
mysql> SELECT @@sql_mode;
+----------------------------------------------------------------------------------------------------------------------+
| @@sql_mode |
+----------------------------------------------------------------------------------------------------------------------+
| PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ORACLE,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,NO_AUTO_CREATE_USER |
+----------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
Problem
There are some `sql_mode` values in MySQL: `ANSI`, `IGNORE_SPACE`, `STRICT_TRANS_TABLES`, etc How can I see the one particular value? The manual says: You can retrieve the current mode by issuing a SELECT @@sql_mode statement. But it just shows nothing, just one blank field in a table with `@@sql_mode` as a column name.