Many operational characteristics of MySQL server can be configured by setting SQL mode. SQL mode is controlled by means of the sql_mode system variable. To assign a value to this variable, use a SET statement. The value should be an empty string, or one or more mode names separated by commas. If the value is empty or contains more than one mode, it must be quoted. If the value is a single mode, quoting is optional. SQL mode values are not case sensitive.
To clear SQL mode:
SET sql_mode = '';
To set SQL modes:
SET sql_mode = 'IGNORE_SPACE,ANSI_QUOTES';
To check the current sql_mode setting:
SELECT @@sql_mode;
Some SQL mode values are composite modes that actually enable a set of modes. To see which mode values a composite mode consist of, retrieve the value after setting it:
SET sql_mode = 'TRADITIONAL';
SELECT @@sql_mode\G
MySQL Reference Manual lists all available SQL modes.





