通过实例简要介绍case函数的用法。
Oracle HowTo:如何使用Oracle case函数.
1.创建测试表:
2.查看相应数据
3.更新语句:
select id,
case when current_credits > 90 then 'a'
when current_credits > 80 then 'b'
when current_credits > 70 then 'c'
else 'd' end grade
from students
4.更新后结果......
Tags:
ORACLE case 函数 数据库 脚本