求一条查询语句表t1Foreign Key:ou外键 表t3 -plu字段Org,plu表t2Foreign Key:ou字段Trf,Ins表t3字段cde
求一条查询语句
表t1
Foreign Key:ou
外键 表t3 ->plu
字段Org,plu
表t2
Foreign Key:ou
字段Trf,Ins
表t3
字段cde
连合查询plu,Org,trf,ins,cde,其中条件plu=(208963,208964,208965,208966,208967,208968,208969)这些值,代码怎么写?
[解决办法]
連接表 在加個條件 plu in (208963,208964,208965,208966,208967,208968,208969)
[解决办法]
- SQL code
SELECT t1.plu,t1.org,t2.trf,t2.ins,t3.cdeFROM t1, t2, t3WHERE t1.ou=t2.ou AND t1.plu = t3.plu AND t1.plu IN (208963,208964,208965,208966,208967,208968,208969)
