3초기억력

오라클 - case 문 본문

쿼리_MSSQL

오라클 - case 문

잠수콩 2011. 4. 8. 18:18




select t1, t2, t3,
   case t4
   when '1' then 'OK'
   when '2' then 'Fail'
   end as t4_YN
from dual; 


select t1, t2, t3,
   case 
   when t4 >= 1000 then 'OK'
   when t4 >= 2000 then 'Fail'
   end as t4_YN
from dual; 
Comments