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 sqlite used for?
what is view? : Sql dba
What is consistency?
How many joins can you have in sql?
Is sql considered coding?
Which tcp/ip port does sql server run?
What are the two types of exceptions in pl/sql?
What is java sql driver?
What is dynamic query?
How do you define a foreign key?
What are %type and %rowtype for?
Which one is better sql or oracle?
what are null values? : Sql dba
What are sql queries used for?
what is data control language? : Sql dba