The NOT EXISTS subqueries are correct. You might get better performance with LEFT JOINs and NULL criteria, but it all depends on the actual data - so you need to compare both versions: SELECT DISTINCT parid FROM pardat LEFT JOIN dweldat ON dweldat.parid = pardat.parid LEFT JOIN comdat ON comdat.parid = pardat.parid WHERE dweldat.parid IS NULL AND comdat.parid IS NULL By the way - why the quotes around the identifier names? That is rather old-fashioned.