oracle 查询空值问题
在A表中 查询 a、b、c三个字段
条件为 
a='1' 或者 a is null 
b='2' 或者 b is null 
c='3' 或者 c is null 
以上条件都要满足
select a,b,c
from A 
where a in (1,null)
and  b in (2,null)
and c in (3,null)
 这样写法是错的。。但不知道正确怎么写
------解决方案--------------------
select a,b,c
from A 
where (a='1' or a is null) and (b=2 or b is null) and (c='3' or c is null)
------解决方案--------------------
错的哦,  你差出的数据时那个不是NULL的。 NULL的是查不出来的  1楼的做法是正确的
------解决方案--------------------你们是不是弄复杂了。。
select a,b,c
from A 
where nvl(a, '1') = '1' and nvl(b, '1') = '1' and nvl(b, '1') = '1'
------解决方案--------------------NULL这个是不能放IN里的,有专用函数NVL,5L正解