[英]How do I search relations on tables SQL
據推測,您打算:
select t1.*
from table1 t1
where (select count(*) from table3 t3 where t3.idtable1 = t1.idtable1) =
(select count(*) from table2);
這說明從所有記錄table1
,其中table3
中包含的所有值idtable2
-假設沒有重復在table3
(與該ID是唯一的)。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.