[英]I want to add a new column using SELECT query and get a latest value from multiple columns in SQL
It seems you simply need the first not-null value.看来您只需要第一个非空值。 If so, You can use COALESCE function -
如果是这样,您可以使用 COALESCE function -
SELECT COALESCE(Outcome1, Outcome2, Outcome3, Outcome4)
FROM your_table;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.