首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

Oracle 的sql话语多条件判断

2012-08-03 
Oracle 的sql语句多条件判断oracle在sql语句查询的时候,经常一个字段的不同的值代表不同意思..?就需要多条

Oracle 的sql语句多条件判断

oracle在sql语句查询的时候,经常一个字段的不同的值代表不同意思..

?

就需要多条件下面是一个多条件判断的sql:

?

?

?

select         oper.opid,        oper.user_name,        oper.user_host,        case         when oper.oper_type = 1  then 'System Manager'         when oper.oper_type = 2  then 'USER Manager'        end case,        case        when oper.oper_object_type = 1 then 'User'        when oper.oper_object_type = 2 then 'Role'        when oper.oper_object_type = 3 then 'Broker'        when oper.oper_object_type = 4 then 'QM Manager'        when oper.oper_object_type = 5 then 'User Group'        when oper.oper_object_type = 6 then 'Msg Flow'        when oper.oper_object_type = 7 then 'Queue'        end case      from esb_log_user_oper oper; 

?

热点排行