不对!
select stinms, cyoumei.cyounm, cyomen, gaikun, jyuukn, syugsti.goutou, syugsti.heyabg
        from jyuukyo inner join cyoumei on (jyuukyo.kencod=cyoumei.kencod and jyuukyo.sicode = cyoumei.sicode and jyuukyo.cyoucd = cyoumei.cyoucd) left join syugsti on jyuukyo.hkcode = syugsti.hkcode
        where jyuukyo.tuuhac = a and
              jyuukyo.kbnkon = b and
              jyuukyo.haituj = c 
              

解决方案 »

  1.   

    I don't like the way of writing inner join and outer join :-)
    Do you know whether SQLServer can accept the oracle (+)?
      

  2.   

    I don`t konw.but Postgresql cann't accept it.
      

  3.   

    to: zhenyukeji(何处是我家)为什么是一个内联再加一个左连接,而不是再加一个右连接呢?我见过两个表的改写,如下:
     (旧)FROM samari a,kikaika b
         WHERE a.hpofno = b.poofno(+)      
     (新)FROM samari a RIGHT JOIN kikaika b ON a.hpofno = b.poofno;而三个的就变了呢?请执教.
     
      

  4.   

    其实你自己已经列出来了嘛
    select stinms, cyoumei.cyounm, cyomen, gaikun, jyuukn, syugsti.goutou, syugsti.heyabg
     from jyuukyo,cyoumei,syugsti
    where jyuukyo.tuuhac = a 
      and jyuukyo.kbnkon = b 
      and jyuukyo.haituj = c 
      AND jyuukyo.kencod = cyoumei.kencod   //
      and jyuukyo.sicode = cyoumei.sicode  //
      and jyuukyo.cyoucd = cyoumei.cyoucd   //
      and jyuukyo.hkcode = syugsti.hkcode;  //这样已经达到了三个表连接起来了。