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
Does mysql_real_escape_string prevent sql injection?
What is a temporal data type?
mention if it is possible to import data directly from t-sql commands without using sql server integration services? If yes, what are the commands? : Transact sql
how can we transpose a table using sql (changing rows to column or vice-versa) ? : Sql dba
What is the clause we need to add in function body to return variable?
How to run sql statements with oracle sql developer?
what is the difference between mysql_fetch_array and mysql_fetch_object? : Sql dba
What are the possible values that can be stored in a boolean data field?
What are the two types of cursors in pl sql?
What is a pl/sql block?
How do you update f as m and m as f from the below table testtable?
what are the other commands to know the structure of table using mysql commands except explain command? : Sql dba
What types of commands can be executed in sql*plus?
What is ttitle and btitle?
Can a table contain multiple foreign key’s?