DELETE FROM A WHERE NOT EXISTS (SELECT * FROM B WHERE A.id = B.id) Jeg har antaget, at disse kolonner hedder id .