SQL “select where not in subquery” returns no results

后端 未结 11 1958
滥情空心
滥情空心 2020-11-29 14:46

Disclaimer: I have figured out the problem (I think), but I wanted to add this issue to Stack Overflow since I couldn\'t (easily) find it anywhere. Also, someone might

11条回答
  •  时光取名叫无心
    2020-11-29 15:39

    SELECT T.common_id
      FROM Common T
           LEFT JOIN Table1 T1 ON T.common_id = T1.common_id
           LEFT JOIN Table2 T2 ON T.common_id = T2.common_id
     WHERE T1.common_id IS NULL
       AND T2.common_id IS NULL
    

提交回复
热议问题