Read the SQL statements in instructions.sql
.
Only one of the following queries will produce 1
, the other two will produce 0
.
Which query will produce the number 1
?
Choice A
select count(*) from example where `status` = "c";
Choice B
select count(*) from example where `status` = "";
Choice C
select count(*) from example where `status` IS NULL;
The prize for working this out (or running the SQL and finding out what happens) is anger.
Want the answer?
The only correct answer is: never use enums in schema. It's content, not structure.