I have two tables that contain member data – ‘members‘ and ‘member_data‘. For some reason (I’ve inherited this) the member_data table has more records than the members table. Both tables have a member_id column that seems to match up a users info between the two tables.
I would like to remove records from the ‘member_data‘ table if there is no matching member_id found in the ‘members‘ table. Can someone point me in the right direction?
You can try using a
NOT INstatement :Anyway, you should correct the bug that inserts or not deletes the unexpected rows.