Oracle HowTo:如何使用Oracle case函数(转)

通过实例简要介绍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  函数  数据库  脚本  
分页:[«] 1[»]
Feed订阅集
勤劳致富^.^
Powered By Z-Blog   STYLE by busfly . FatMouse
Copyright © 2007 巴士飞扬技术博客. . 沪ICP备07027972号. 会员群1(VS为主):3769186.