2011-11-07 111 views

回答

2

是這樣的:

select * from tableA where cloInAB in (select colInAB from tableB where colB = 5); 
1

我想加盟會比在子查詢的結果的查詢更好 - 是這樣的:

select A.* from tableA A 
join tableB B on A.colInAB = B.colInAB 
where B.colB = 5 
+0

是啊... JOIN也是一個不錯的選項。 –