Re: Delete with a multi-column join? - Mailing list pgsql-general

From Tom Lane
Subject Re: Delete with a multi-column join?
Date
Msg-id 7226.1106690140@sss.pgh.pa.us
Whole thread Raw
In response to Delete with a multi-column join?  (leon-pg@comvision.com)
List pgsql-general
leon-pg@comvision.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

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: EMBEDDED PostgreSQL
Next
From: "Magnus Hagander"
Date:
Subject: Re: EMBEDDED PostgreSQL