日期:2014-05-17 浏览次数:20524 次
select case when col1 = 1 then "1" else when col1 = 2 then "2" else when col1 = 3 then "3" from table1 where (case when col = 1 then 1 else when col = 2 then 2 else when col = 3 then 3 )> col2
select * from ( select case when col1 = 1 then "1" else when col1 = 2 then "2" else when col1 = 3 then "3" end condi,* from table1 )t where condi>col2