title: Delete same values from another db table
body: <p>I have two databases with the same structure. How can i delete records from db1.table, that exists in db2.table?</p>
  
  <p>db1 table: a - 1, a - 2, b - 1, c - 1</p>
  
  <p>db2 table: a - 1, a - 2, c - 1, c - 2</p>
  
  <p>result: b - 1</p>
  
  <p><strong>Update:</strong></p>
  
  <p>This query doesn't work</p>
  
  <pre><code>DELETE t1 
  FROM table t1 
  JOIN db2.table t2 
  WHERE t1.PrdID = t2.PrdID AND t1.CategoryID=t2.CategoryID
  </code></pre>
  
  <p>It gives me error</p>
  
  <pre><code>near "t1": syntax error: 
  </code></pre>
  
  <p>db2 is attached to db1</p>