SELECTCASE WHEN null = nullTHEN ‘True’ELSE ‘False’END AS Result;
Interviews4 answers
Q. What is the result of following query?
4 Answers
Ans :- Null
When we compare the null = null then sql understand it like Unknown but when we return its value in identity then you will get the null as result.
Upendra RajPosted Dec 28, 2023, 1:55 AM EST
False
Avneesh AryanPosted Oct 26, 2023, 3:16 AM EDT
The result will be 'False'
This is because the comparison 'NULL=NULL' evaluates to 'UNKNOWN', and since there is no specific condation for 'UNKNOWN' in your 'CASE' statement, it falls back to the 'ELSE' clause, which return 'False'
srihari nelapatiPosted Oct 21, 2023, 1:46 PM EDT
False
Ajay KumarPosted Oct 18, 2023, 12:14 AM EDT



