我想实现以下目的:
select a from b where b.code in (case when b.code=y then ('12','13') end)
也就是当表b.code=y时,要求返回满足条件 ...where b.code in (12,13)的数据行。
不知道哪位达人有其它办法吗?
用case怎么也实现不了。
...全文
863打赏收藏
问一个case相关的SQL问题
我想实现以下目的: select a from b where b.code in (case when b.code=y then ('12','13') end) 也就是当表b.code=y时,要求返回满足条件 ...where b.code in (12,13)的数据行。 不知道哪位达人有其它办法吗? 用case怎么也实现不了。