title: Avoid inserting duplicate column values
body: <p>I have a very simple table with 3 columns <code>tag_id, label, timestamp</code> and I need as lightweight as possible a query to insert only when there is a new value for the column <code>label</code>.</p>
  
  <p>How would I write an sql query to do this? I can see some examples already on the site but they are all mixed up in more complex queries (some involving subqueries) that I can't understand. </p>
  
  <p>There seems to be different ways of doing it and I need to find out the most lightweight one so that I can repeat it in a loop to insert multiple tags in one go without putting too much strain on the server.</p>