get record which is available in one table but not in another mysql 1

get record which is available in one table but not in another mysql

SELECT  *
FROM    Call
WHERE   phone_number NOT IN (SELECT phone_number FROM Phone_book)

Here is what the above code is Doing:
1. Select all the columns from the Call table.
2. Select only the rows where the phone_number is not in the Phone_book table.

The result of this query is a table with all the calls that were not made to a phone number in the Phone_book table.

Similar Posts