Reading Variables

To retrieve the value of a variable, use the @@ selector with the variable in a SELECT statement. For example,

SELECT @@sql_mode;
+-------------------+
| @@sql_mode        |
+-------------------+
| STRICT_ALL_TABLES |
+-------------------+
1 row in set (0.27 sec)

Last modified:

Was this article helpful?