I have two column in the table
column 1 column 2
........ .........
v1 v4
v2 v5
NULL v6
NULL v7
NULL v8
where v1 v2 v3 v4 v5 v6 are the values of the column type is varchar
I want to get the output as merged columns but should have only value of the first column
column 1
.......
v1
v2
v6
v7
v8
Standard SQL is COALESCE:
SELECT COALESCE(column1,column2) as column1
FROM ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With