更新时间:2022-12-12 11:21:16
select memberID, coalesce(value1, value2, value3, value4, value5)
from myTable
如果存在所有值都可能为空的可能性,您可能希望默认为一个值.
If the possibility exists that all of the values could be null, you may want to default to a value.
select memberID, coalesce(value1, value2, value3, value4, value5, <default>)
from myTable