Eg : Table
COL1 COL2 COL3
ADAM NULL AAA
NULL EVE BBB
NULL NULL CCC
How to select first NOT NULL value? Please suggest. Thanks!!!
Eg : Table
COL1 COL2 COL3
ADAM NULL AAA
NULL EVE BBB
NULL NULL CCC
How to select first NOT NULL value? Please suggest. Thanks!!!
If you want the first value that is not NULL, you can use COALESCE:
select coalesce(col1, col2, col3) from table
It will still give you NULL if col1 and col2 and col3 are NULL.