表t1
Foreign Key:ou
外键 表t3 ->plu  
字段Org,plu表t2  
Foreign Key:ou
字段Trf,Ins表t3
字段cde  用Oracle连合查询plu,Org,trf,ins,cde,其中条件plu=(208963,208964,208965,208966,208967,208968,208969)这些值,代码怎么写?
 

解决方案 »

  1.   

    表示完全看不懂@
    糊弄一个:
    select a.plu,a.Org,b.trf,b.ins,c.cde
    from t1 a inner join t3 c on a.ou=c.ou
    inner join t2 b on b.ou=c.ou
    where a.plu in(208963,208964,208965,208966,208967,208968,208969)
      

  2.   

    请参考:SELECT Plu, Org, Trf, Ins, Cde
    FROM t1 JOIN t2 USING(t1和t2的主外键列名)
    JOIN t3 USING(主外键列名)
    WHERE t1.Plu IN (208963,208964,208965,208966,208967,208968,208969);