Re: RE: Help with query. (*)

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: sqllist <pgsql-sql(at)postgresql(dot)org>
Subject: Re: RE: Help with query. (*)
Date: 2001-01-17 20:57:49
Message-ID: 3A66074D.827227D0@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

Mike,

In that case, you want to use this construction:

DELETE FROM a
WHERE EXISTS (
SELECT 1 FROM b
WHERE b.1 = a.1
AND b.2 = a.2
AND b.3 = a.3 );

Of course, a good primary keying system would make this somewhat less
complex ...

-Josh Berkus
--
______AGLIO DATABASE SOLUTIONS___________________________
Josh Berkus
Complete information technology josh(at)agliodbs(dot)com
and data management solutions (415) 436-9166
for law firms, small businesses fax 436-0137
and non-profit organizations. pager 338-4078
San Francisco

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Joseph Shraibman 2001-01-17 20:58:35 Re: pg_log
Previous Message Robert B. Easter 2001-01-17 20:53:30 Re: Using max() MUCH slower in v7.1

Browse pgsql-sql by date

  From Date Subject
Next Message Keith Gray 2001-01-17 22:51:59 Re: Boolean and Bit
Previous Message Diehl, Jeffrey 2001-01-17 20:17:57 RE: Help with query. (*)