Server SQL Mode


  1. When no modes are enabled, what does this statement return?
    SELECT @@SESSION.sql_mode;











  1. 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.


  1. Which statement can be used to specify the sql_mode system variable at runtime?











  1. 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.



  1. Which of the following commands sets the SQL mode as TRADITIONAL?











  1. 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.


  1. MySQL server mode values are case sensitive.











  1. 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.



  1. Which of these modes is a composite server mode?











  1. 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.