SQL> create table aa(id varchar2(2),name varchar2(10));Table createdSQL> insert into aa values('1','煤炭');1 row insertedSQL> create table bb(id varchar2(2),price varchar2(10));Table createdSQL> insert into bb values('1','1000');1 row insertedSQL> create table cc(id varchar2(2),num varchar2(10));Table createdSQL> insert into cc values('1','200');1 row insertedSQL> select aa.id,price,num from aa,bb,cc where aa.id=bb.id(+) and aa.id=cc.id(+);ID PRICE      NUM
-- ---------- ----------
1  1000       200以下这种情况就只能出现一次:
SQL> select aa.id,price,num from aa,bb,cc where aa.id(+)=bb.id and aa.id(+)=cc.id;select aa.id,price,num from aa,bb,cc where aa.id(+)=bb.id and aa.id(+)=cc.idORA-01417: 表可以外部连接到至多一个其它的表

解决方案 »

  1.   

    select code,mc,b,c
     from a, b, c
     where a.code=b.code(+) and a.code=c.code(+) 
     order by code;是可以的 但是下面的就是不行的
    select code,mc,b,c
     from a, b, c
     where a.code=c.code(+) and b.code=c.code(+) 
     order by code;
      

  2.   

    SQL> select aa.id,price,num from aa,bb,cc where aa.id=cc.id(+) and bb.id=cc.id(+);select aa.id,price,num from aa,bb,cc where aa.id=cc.id(+) and bb.id=cc.id(+)ORA-01417: 表可以外部连接到至多一个其它的表是的,也不可,对于同一表上!
      

  3.   

    是可以对多个表进行这个操作的,但是一个表只能有一个方向,我记得是这样,有时候这个毛病会让人很反感,sqlserver也不至于有这个毛病的,而oracle9i使用join操作符就解决了这个问题
    如果是8i的话,会气的人想跳楼的