外部結合を使用する
SELECT A.*
FROM Table1 a
LEFT OUTER JOIN (SELECT DISTINCT subject
FROM Table2) b ON a.id = b.subject
WHERE b.subject IS NULL
外部結合を使用する
SELECT A.*
FROM Table1 a
LEFT OUTER JOIN (SELECT DISTINCT subject
FROM Table2) b ON a.id = b.subject
WHERE b.subject IS NULL