Examveda

Which mode prevents entry of the 'zero' date value in strict mode?

A. SUPPRESS

B. NO_ZERO_DATE

C. PREVENT

D. NO_ZERO_IN_DATE

Answer: Option B

Solution (By Examveda Team)

This question is about MySQL's strict mode and how it affects date values. Let's break it down:
In MySQL, the 'zero' date value ('0000-00-00') is a special case. It's often used to represent a missing or unknown date.
Strict mode in MySQL is a setting that makes the database more rigorous about data types and values. This means it will be more likely to reject incorrect or problematic data.
Now, let's look at the options:
Option A: SUPPRESS - This option isn't related to date values or strict mode.
Option B: NO_ZERO_DATE - This is the correct answer. In strict mode, the NO_ZERO_DATE setting prevents the database from accepting the 'zero' date ('0000-00-00').
Option C: PREVENT - This option is too general and isn't a specific MySQL setting.
Option D: NO_ZERO_IN_DATE - This option is not a valid MySQL setting.
So, the answer is Option B: NO_ZERO_DATE.

This Question Belongs to MySQL >> MySQL Miscellaneous

Join The Discussion

Related Questions on MySQL Miscellaneous