为什么你希望他不一样呢?你想要什么样的结果呢?曾经有个问题是这么问的:一个表user中有50条记录,user_id主键select count(*) from user a   --50select * from user a,user b where a.user_id=b.user_id 有多少记录?
select * from user a,user b where a.user_id=b.user_id(+) 又有多少记录?
select * from user a,user b where a.user_id(+)=b.user_id 又有多少记录?

解决方案 »

  1.   

    应该是不一样的,因为我还有条件a.deptno=10 and b.deptno=20 
    部门20中可能没有部门10中有的job,所以我要做外连接
      

  2.   

    楼主:select * from scott.emp a,scott.emp b where a.job=b.job(+)
    and a.deptno=10 and b.deptno=20 外连接后,b表的字段是空的,所以你加了b.deptno=20 当然跟select * from scott.emp a,scott.emp b where a.job=b.job
    and a.deptno=10 and b.deptno=20 一样啦
    要实你想要的应该这样:
    select * from scott.emp a,scott.emp b where a.job=b.job(+)
    and a.deptno=10 and b.deptno(+)=20这才是过滤出b.deptno(+)=20的数据后再与a外连明白了吗?