Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f0HL1P062631 for ; Wed, 17 Jan 2001 16:01:25 -0500 (EST) (envelope-from josh@agliodbs.com) Received: from [208.59.253.44] (HELO agliodbs.com) by davinci.ethosmedia.com (CommuniGate Pro SMTP 3.3) with ESMTP id 1178440 for pgsql-sql@postgresql.org; Wed, 17 Jan 2001 13:01:22 -0800 Message-ID: <3A66074D.827227D0@agliodbs.com> Date: Wed, 17 Jan 2001 12:57:49 -0800 From: Josh Berkus Reply-To: josh@agliodbs.com Organization: Aglio Database Solutions X-Mailer: Mozilla 4.73 [en] (Win98; I) X-Accept-Language: en MIME-Version: 1.0 To: sqllist Subject: Re: RE: Help with query. (*) References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200101/197 X-Sequence-Number: 862 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@agliodbs.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