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


Please Help Members By Posting Answers For Below Questions

Does mysql_real_escape_string prevent sql injection?

525


What is a temporal data type?

584


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

548


how can we transpose a table using sql (changing rows to column or vice-versa) ? : Sql dba

493


What is the clause we need to add in function body to return variable?

526






How to run sql statements with oracle sql developer?

606


what is the difference between mysql_fetch_array and mysql_fetch_object? : Sql dba

547


What are the possible values that can be stored in a boolean data field?

503


What are the two types of cursors in pl sql?

520


What is a pl/sql block?

580


How do you update f as m and m as f from the below table testtable?

1048


what are the other commands to know the structure of table using mysql commands except explain command? : Sql dba

543


What types of commands can be executed in sql*plus?

538


What is ttitle and btitle?

565


Can a table contain multiple foreign key’s?

550