Rajeev Kumar
Q. What is the result of following query?
  1. SELECT
  2. CASE WHEN null = null
  3. THEN True
  4. ELSE False
  5. END AS Result;
By Rajeev Kumar in .NET on Oct 10 2023
  • Upendra Raj
    Dec, 2023 28

    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.

    • 0
  • Avneesh Aryan
    Oct, 2023 26

    False

    • 0
  • srihari nelapati
    Oct, 2023 21

    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'

    • 0
  • Ajay Kumar
    Oct, 2023 18

    False

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS