oracle 怎么实现应该类似if esle的功能
答案:2 悬赏:0
解决时间 2021-02-18 01:04
- 提问者网友:不爱我么
- 2021-02-17 04:48
oracle 怎么实现应该类似if esle的功能
最佳答案
- 二级知识专家网友:北方的南先生
- 2021-02-17 05:09
where (参数= a and sid is null ) or ( 参数 <> a and name = c )
或者 where 1= (case whena=参数 and sid is null then 1 else when 参数 <> a and name = c then 1 else 0)
或者 where 1= (case whena=参数 and sid is null then 1 else when 参数 <> a and name = c then 1 else 0)
全部回答
- 1楼网友:白昼之月
- 2021-02-17 05:52
sql中使用case when来判断。
case when name='c' then name else c end
case when name='c' then name else c end
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯