首页 > 数据库技术 > 详细

学习SQL日记(五)

时间:2015-01-04 15:08:02      阅读:315      评论:0      收藏:0      [点我收藏+]

where 子句里面根据传入参数 决定使用哪一个条件

  SQL> select 1 from dual where decode(1,1,1,0)=1;

  SQL> select 1 from dual where (case when 1=1 then 1 else 0 end) = 1;

学习SQL日记(五)

原文:http://www.cnblogs.com/xxx-xxx/p/4200981.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!