Server SQL Mode
- When no modes are enabled, what does this statement return?
SELECT @@SESSION.sql_mode;
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
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.
- Which statement can be used to specify the sql_mode system variable at runtime?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
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.
- Which of the following commands sets the SQL mode as TRADITIONAL?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
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.
- MySQL server mode values are case sensitive.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
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.
- Which of these modes is a composite server mode?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
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.