Or:
DELETE a WHERE a.some_field IN (SELECT some_field FROM b)
or
DELETE A WHERE EXISTS (SELECT 1 FROM b WHERE b.field1 = a.field2)
Depending on your database, you may find that one works especially better than the other. IIRC Oracle prefers that WHERE IS THERE EXISTS IN, but this may depend on a number of factors.
source share