Posted by Jason on 10/02/53 11:51
Try one of these:
SELECT * FROM tableA WHERE client_id NOT IN (SELECT client_id FROM
tableB)
SELECT a.*
FROM tableA a
LEFT JOIN tableB b ON a.client_id = b.client_id
WHERE b.client_id IS NULL
you should see better performance on the second one if you have a lot
of rows in your tables.
Jason
Navigation:
[Reply to this message]
|