Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I have a table with 3 columns (A,B,C).
In each row, only one of the columns is not null.
How do I create a function column or a computed column that will consist from all the non null values?
Something like: column(A or B or C)
The syntax for virtual columns is very simple:
ALTER TABLE tableX
ADD abc AS (COALESCE(a, b, c)) ;
Tested at rextester.com.
Required, but never shown