Re: Delete with a multi-column join?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: leon-pg(at)comvision(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Delete with a multi-column join?
Date: 2005-01-25 21:55:40
Message-ID: 7226.1106690140@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

leon-pg(at)comvision(dot)com writes:
> Is there a better way to write this?

> delete
> from tbldata
> where unitID || '_' || variableID || '_' || cycleID in
> (select unitID || '_' || variableID || '_' || cycleID from
> temp_data_table)

delete
from tbldata
where (unitID, variableID, cycleID) in
(select unitID, variableID, cycleID from temp_data_table)

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Carlos 2005-01-25 21:58:33 Size of data stored in bytea record?
Previous Message Tom Lane 2005-01-25 21:35:35 Re: EMBEDDED PostgreSQL