学习SQL日记(五)

时间:2015-01-04 15:08:06   收藏:0   阅读:147

①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;

评论(0)
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!