2010年09月11日 に更新 MySQLで片方のテーブルに無いものを抽出する ツイート ⚠️ この記事は最終更新日から3年以上が経過しています。 not exists構文を用います。 select * from tableA where not exists ( select * from tableB where tableA.key1 = tableB.key1 and tableA.key2 = tableB.key2 ); 便利ですがレコード数が多い場合インデックスをちゃんと貼らないと重くなることに注意。 ツイート