Monday 16 July 2012

case in PL/SQl

case in pl/sql is similar to case in other languages.

select name,case when salary < 10000 then 10*salary
                            when salary = 10000 then  salary
                            else 0.1*salary end "reviced salary"
                             from employee;

No comments:

Post a Comment