I\'ve got the following two SQL tables (in MySQL):
Phone_book +----+------+--------------+ | id | name | phone_number | +----+------+--------------+ | 1 | J
SELECT DISTINCT Call.id FROM Call LEFT OUTER JOIN Phone_book USING (id) WHERE Phone_book.id IS NULL
This will return the extra id-s that are missing in your Phone_book table.