0
interview questions select case when null = null then 'Yup' else 'Nope' end as Result;
7 odpowiedzi
+ 2
nope
0
correct
0
nope
0
nope
0
result = nope as you need to use 'is' operator with null values in place of '=' to get yup
0
NULL means unknown. Hence two unknown NULLs can't be same/equal. The above solution provided by Saurabh Joshi is correct. I tried it myself and it works. :). Thanks.
select case when null is null then 'yup' else 'nope' end as result;
0
The null has a memory reference. So, one null value cannot be equal to another null value.
See the below result:
select
case when null=null
then 'Yes'
else 'No'
end
as Result
from dual;
================================================
Result=No