Discuss in Forum
When it is needed to determine the current value of the session SQL mode, the above statement is executed. The returned value consists of a comma-separated list of the modes that are enabled.
The ‘SET’ statement can change the SQL mode at runtime. For example, the statement SET sql_mode = ‘ANSI_QUOTES’ can be used by a client in its own session specific SQL mode.
When the server starts, the command –sql-mode=’TRADITIONAL’ can be used to set the SQL mode as ‘TRADITIONAL’. This can be stored in an option file or can be directly executed on the command line.
The MySQL server mode values stored in the system variable are not case sensitive. So it does not make a difference if you accidentally store the mode values in lowercase or uppercase.
The ‘ANSI’ mode value is a composite mode. It turns on several other mode values like ANSI_QUOTES, PIPES_AS_CONCAT. This makes the server behave much like standard SQL than the default mode.