Wybierz z jednej tabeli, gdzie nie na drugiej
SELECT id FROM a.table
WHERE id NOT IN (SELECT b.id FROM b.id)
Giamblers
SELECT id FROM a.table
WHERE id NOT IN (SELECT b.id FROM b.id)