select
(case when
to_char(sysdate,'day')
= '星期五' then 10000
when
to_char(sysdate,'day')
= '星期六' then 8000
else
5000
end) as Money
from dual
----------------------------------
一种是简单CASE:
CASE 姓名
WHEN 小王 THEN ...
WHEN 小李 THEN ...
ELSE ...
END
一种是搜索CASE:
CASE
WHEN 职业='技工' THEN ...
WHEN 工资>2000 THEN ...
ELSE
END