Wednesday, August 20, 2014

Compare difference in two MySQL tables




 I have two same  MySQL tables  courses_offered and courses_offered_temp, courses_offered_id
is the primary key, Now I want to  compare difference in these two MySQL tables
SELECT courses_offered_temp.courses_offered_id FROM courses_offered_temp WHERE courses_offered_temp.courses_offered_id NOT IN(SELECT courses_offered.courses_offered_id FROM courses_offered)

No comments:

Post a Comment