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:

  ADD abc AS (COALESCE(a, b, c)) ;

Tested at rextester.com.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.