Mysql Error handling


  1. STRICT_ALL_TABLES turns on stricter checking of data values.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    The SQL mode ‘STRICT_ALL_TABLES’ turns on the stricter checking of inserted or the updated data values. This can also be done with the ‘STRICT_TRANS_TABLES’ mode for transactionals.


  1. Which mode prevents entry of the ‘zero’ date value in strict mode?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    The ‘NO_ZERO_DATE’ prevents the entry of the ‘zero’ date value in strict mode. In MySQL, to suppress errors, the IGNORE keyword is used with INSERT or UPDATE statements.



  1. Which keyword suppresses errors?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    In MySQL, to suppress errors, IGNORE keyword is used with INSERT or UPDATE statements. With the IGNORE clause, statements that would result in an error due to invalid values result only in a warning.


  1. Which mode prevents MySQL to perform full checking of date parts?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    In MySQL, it is also possible to selectively weaken the strict mode at some places. If the ALLOW_INVALID_DATES SQL mode is enabled, MySQL doesn’t perform full checking of the date parts.



  1. Which mode is a shorthand for ‘both strict modes plus a bunch of other restrictions’?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    In MySQL, the ‘TRADITIONAL’ mode is used to enable the strict mode. It also enables all of the additional restrictions by the command ‘SET sql_mod = ‘TRADITIONAL” The other SQL modes have other functions.