title: How to compare a query to a table in sql
body: <p>I have queries that finds people that are subscribed, and inserts their emails into a table. To update this, it always truncates the table and inserts all records in it again.
  Now
  I want this to not truncate and insert all the data each time (takes a long time for very large records), but do the selection and check with the old table if there was a change, and only add/remove those few records to the table.</p>
  
  <p>Any Idea how would I approach this solution?</p>