單項(xiàng)選擇題

對(duì)于雇員表(EMP)中的員工薪水(SAL)進(jìn)行分級(jí),3000元以上的為A級(jí),2000元以上到3000元為B級(jí),2000元及以下為C級(jí),以下哪此操作能實(shí)現(xiàn)以上要求()

A.select sal,decode(sal>3000,'A',sal>2000,'B','C') grade from emp;
B.select sal,decode(sal,3000,'A',2000,'B','C') grade from emp;
C.select sal,(case when sal>3000 then 'A' when sal>2000 then 'B' else 'C' end) grade from emp;
D.select sal,(if sal>3000 then 'A' elsif sal>2000 then 'B' else 'C' end if) grade from emp;

微信掃碼免費(fèi)搜題