Skip to content
Advertisement

How to fetch single records using case statements

I want to fetch single record from the table test_table if any one of the value is null in the column e_value then it should print No else Yes

My Attempt:

Current Output:

Expected Output:

Advertisement

Answer

you can use GROUP BY and COUNT:

The count will return number of non-null values

db<>fiddle here

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement