如果应该从case-statement中“提取”列,是否可以引用表中的列?TSQL:引用具有case语句的列
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)
在此先感谢您的帮助!
另外:[This](http://stackoverflow.com/a/1599201/92546)答案提供了几个理由考虑使用更现代的'JOIN'语法。 – HABO