Oracle 的sql语句多条件判断
来源:互联网 发布:ftp上传工具 for mac 编辑:程序博客网 时间:2024/05/21 22:25
就需要多条件下面是一个多条件判断的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;
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;
- Oracle 的sql语句多条件判断
- SQL条件判断语句
- SQL条件判断语句
- SQL条件判断 -- SQL语句条件判断连接符的问题
- SQL利用Case When Then多条件判断SQL 语句
- Oracle SQL 条件查询语句
- T-SQL语句之case when then 多条件判断
- SQL查询语句中的条件判断CASE
- sql语句中用条件逻辑判断
- 关于多条件查询的SQL语句
- SQL的多条件查询语句
- 多条件if()判断语句
- 2、SQL Server:SQL利用Case When Then多条件判断SQL 语句
- Oracle [PL/SQL]中的条件语句
- Oracle数据库Sql语句详解----条件查询
- Oracle条件语句的用法
- 基础知识—条件判断语句-if条件类型的语句
- sql T_sql 利用Case When Then多条件判断SQL 语句
- LLVM IR 语法简介(一)
- js学习网址
- 显示当前月的日历(摘自java核心技术.卷I)
- Protection 2 ---- Limit Checking
- 1507 Uncle Tom's Inherited Land* 二分图-----黑白染色+奇偶匹配(1X2的矩形覆盖)
- Oracle 的sql语句多条件判断
- 1 android高级编程——程序启动动画的实现
- Disaster Recovery, High Availability, and Continuous Availability - What's the Difference?
- 记录代码——循环移位
- js代码规范
- Z-Stack协议分析工具之Packet Sniffer
- java transient
- android listview中的adapter
- worldwind学习笔记-7-找找如何画球的