67,513
社区成员
发帖
与我相关
我的任务
分享
StringBuffer sb = new StringBuffer("select * from table where ");
if(b==null){
sb.append(" a is null ");
}else{
sb.append(" a = b ");
}
if(d==null){
sb.append(" and c is null ");
}else{
sb.append(" and c = d ");
}
where 1=decode(a,0,decode(a,b,1,0),decode(nvl(a,0),0,1,decode(a,b,1,0)))