select * from t where t.栏位1=decode(in_a,null,t.栏位1,in_a) and t.栏位2=decode(in_b,null,t.栏位2,in_b)
解决方案 »
- ORACLE 10列和表合并问题,麻烦大家帮忙
- 弱弱的问,oracle8.1.7支持集群吗?
- C#中调用oracle的存储过程出现问题!
- 求助:OracleOraHomeTNSListener服务启动后又停止
- 如何设计实现这样的数据库???
- ORACLE里的SQL查询语句中,能用INNER JOIN吗?
- database links的疑问
- 错误PLS-00201: identifier 'SYS.V_$SESSION' must be declared
- 运行oracle对电脑的最底配置?
- 简单问题在存储过程中如何建临时表?
- ORACLE PLS-00905错误
- sqlplus特殊字符显示?问题
select * from t where t.栏位1=decode(in_a,null,t.栏位1,in_a) and t.栏位2=decode(in_b,null,t.栏位2,in_b)
也可能 栏位1 like '%in_a%', 所以用decode??
1 (栏位1=in_a or in_a is null) and (栏位2=in_b or in_b is null)
*
from tables
where (in_a is not null and 栏位1 = in_a)
and (in_b is not null and 栏位2 = in_b)