17,140
社区成员




select
*
from
student
where
.....此处有多个检索条件,假设为以下。。
A = A
and B=B
and
-----我想在此处实现,当满足条件年龄!= 1 的时候 添加一个检索条件 username = 'a'
select
*
from
student
where
A= A
and B=B
and username =
case when age !=1 then 'a'
else username
end
select
*
from
student
where
A= A
and B=B
and username = decode(age,1,username,'a')