title: Delete from table A joining on table A in Redshift
body: <p>I am trying to write the following MySQL query in PostgreSQL 8.0 (specifically, using Redshift):</p>
  
  <pre><code>DELETE t1 FROM table t1
  LEFT JOIN table t2 ON (
      t1.field   = t2.field AND
      t1.field2  = t2.field2
  )
  WHERE t1.field &gt; 0
  </code></pre>
  
  <p>PostgreSQL 8.0 does not support <code>DELETE FROM table USING</code>. The examples in the <a href="http://www.postgresql.org/docs/8.0/static/sql-delete.html" rel="noreferrer">docs</a> say that you can reference columns in other tables in the where clause, but that doesn't work here as I'm joining on the same table I'm deleting from. The other example is a subselect query, but the primary key of the table I'm working with has four columns so I can't see a way to make that work either.</p>