What is the result, when NULL is compared with NULL?
Answer Posted / affan shemle
It is absolutely perfect to compare NULL with NULL. It
yields the result NULL. For those who are saying the result
is FALSE they are taking the answer from IF THEN ELSE. In
all the above answers supported by IF Statement there is a
catch. The result of IF is a Boolean. A Boolean can hold
TRUE, FALSE or NULL. So when you compare NULL vs NULL as a
condition of IF THEN, it returns NULL so the controller goes
to ELSE skipping the IF. Makes sense???
/
AFFAN SHEMLE
| Is This Answer Correct ? | 13 Yes | 1 No |
Post New Answer View All Answers
what is denormalization. : Sql dba
What are the different types of tables in sql?
What is dialect in sql?
what are set operators in sql? : Sql dba
what is a trigger? : Sql dba
Does truncate release storage space?
Why do we use procedures in sql?
What does the hierarchical profiler does?
How sql query is executed?
How can you maintain the integrity of your database on instances where deleting an element in a table result in the deletion of the element(s) within another table?
how to get @@error and @@rowcount at the same time? : Sql dba
What is the difference between database trigger and stored procedure?
How to read/write files from pl/sql?
how to load data files into tables with 'mysqlimport'? : Sql dba
What is the most common sql injection tool?