title: PostgreSQL match multiple values between tables
body: <p>I have this query to insert data which is not present inside <code>mytab</code> from <code>temptab</code></p>
  
  <pre><code> INSERT INTO mytab SELECT * FROM temptab 
    WHERE NOT EXIST (SELECT  * FROM mytab WHERE 
      (mytab .col1= temptab .col1 AND mytab .col2=temptab .col2))  
  </code></pre>
  
  <p>I want to know if there is any other way of writing this query's condition part i.e. the last statement.<br>
  The above query works absolutely fine but becomes too lengthy when matching many more columns. So I was thinking if there is any kind of format some what like</p>
  
  <pre><code> mytab.(col1,col2,...,coln)=temptab.(col1,col2,...,coln)  
  </code></pre>
  
  <p>I need to match so many columns since combination of these works as primary key for my table.Similary there exist many more tables.  </p>
  
  <p>any views appreciated.  </p>
  
  <p><strong>P.S.</strong> : don't hesitate to improve the query.</p>