您的位置:首页 > 数据库 > Oracle

Oracle case 关键字的使用

2013-09-28 15:39 218 查看
select e.salary,
--case 语句开始
case
when salary between 12000 and 15000 then
salary + 6000
else
salary
end new_salary
--case 语句结束,可见也和存储过程等结束方式一样用end关键字,且这个case语句的作用只是用来计算一个新的列
from t_employee e;


输出结果如下:

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐