日期:2014-05-18 浏览次数:20595 次
select 1 as a,case 2 when 2 then 3 else 4 end as b,1*b as c
select a,1*b as c from ( select 1 as a,case 2 when 2 then 3 else 4 end as b from tab ) t
------解决方案--------------------
;with temp as(select 1 as a,case 2 when 2 then 3 else 4 end as b) select temp.*,temp.b * 1 as c from temp