Mysql Error handling


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



  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 used to turn on strict mode and all of the additional restrictions?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    The ‘TRADITIONAL’ mode is used to enable the strict mode and all of the additional restrictions. It is done by the command SET sql_mod = ‘TRADITIONAL’; The other SQL modes have other functions.



  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.