I liked Shlomi Noach post on “IS TRUE and IS FALSE“. This kind of logic create bugs.
What will this return?
select if((1 = true) and ( 1 is TRUE) and (NULL is not TRUE), TRUE, FALSE) as answer;
You should know,
NULL is never TRUE or FALSE but
NULL is always NOT TRUE or NOT FALSE.
NULL is a little like a vacuum. Ancient Greek philosophers did not like to admit the existence of a vacuum, asking themselves “how can ‘nothing’ be something?”. Does GOD exist in NULL?
If select “” is NOT NULL; is TRUE what is “”?
select "" is NOT NULL; +----------------+ | "" is NOT NULL | +----------------+ | 1 | +----------------+…[Read more]