On Friday 08 October 2004 07:10, Thomas F.O'Connell wrote:
> A query that should get the job done is:
>
> SELECT registration_id
> FROM registrations r
> WHERE NOT EXISTS (
> SELECT 1
> FROM receipts
> WHERE registration_id = r.registration_id
> );
Don't, PLEASE, don't !!!
drive this way :
SELECT r.registration_id
FROM registrations AS r
LEFT OUTER JOIN receipts AS rec
ON rec.registration_id = r.registration_id
WHERE rec.registration_id IS NULL;