如果列应该从case-statement中“提取”,是否可以从表中引用该列?
update t1
set col1 = value
from table1 t1, (select Col3, Col4 from table1) t2
where t1.(CASE
WHEN Col3 > 0 THEN Col1
ELSE Col2) = t2.(CASE WHEN Col3 > 0
THEN Col1
ELSE Col2
END)提前感谢您的帮助!
https://stackoverflow.com/questions/38369473
复制相似问题