title: How to join a table to find the items which do not exist
body: <p>my question may seem strange. But I have a question, how should I do a JOIN on a table for the following purpose:</p>
  
  <p>I have a table called <code>categories</code>.</p>
  
  <p>I have another pivot table called <code>categories_products</code></p>
  
  <p>Regularly I do a left join to get the categories of one product.</p>
  
  <p>Now, after several month, there are some categories deleted from <code>categories</code> table. I had forgot to put a trigger at that time (that delete all related <code>categories_products</code> records of the deleted cat). I want to delete any record (which now is considered to be unused) from <code>categories_products</code> where its categories item is deleted (does not exist). What query should I write? Nothing comes to my mind. Thanks</p>