and b.col2='test'把记录过滤掉了

解决方案 »

  1.   

    select * from a,b where a.col1=b.col1(+)返回的结果集中有b.col2='test'的记录吗?
    有的话,是否是空格的问题
    try:
    select * from a,b where a.col1=b.col1(+) and trim(b.col2)='test';
      

  2.   

    基本同意楼上观点,and b.col2='test'把记录过滤掉了
      

  3.   

    是啊,如何才能不过滤,要b.col2='test'的记录再和a左连接。
    最好不用子查询?
      

  4.   

    知道了,应该是select * from a,b where a.col1=b.col1(+) and (b.col2='test' or b.col2 is null)。
    但是能不能先过滤b.col2='test'然后再连接??