Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id CBFB3477496 for ; Thu, 30 Jan 2003 10:08:06 -0500 (EST) Received: from biglumber.com (biglumber.com [207.228.252.42]) by postgresql.org (Postfix) with SMTP id BF4CE476373 for ; Thu, 30 Jan 2003 10:08:02 -0500 (EST) Received: (qmail 3546 invoked from network); 30 Jan 2003 15:04:20 -0000 Received: from biglumber.com (HELO localhost) (207.228.252.42) by 0 with SMTP; 30 Jan 2003 15:04:20 -0000 From: greg@turnstep.com To: pgsql-sql@postgresql.org Subject: Re: Delete 1 Record of 2 Duplicate Records X-PGP-Fingerprint: 2529 DF6A B8F7 9407 E944 45B4 BC9B 9067 1496 4AC8 In-Reply-To: <20030130115201.D4EB21833A@cheetah.webtribe.net> Date: Thu, 30 Jan 2003 15:04:20 -0000 X-Mailer: JoyMail 1.36 Message-ID: <07f0833692070125b9317094e7008b4f@biglumber.com> X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/502 X-Sequence-Number: 11367 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 If they are truly identical, then you must use the hidden 'oid' column to differentiate the two. No need to peek at the oid, just do this: DELETE FROM test WHERE oid = (SELECT oid FROM test WHERE column_id=5 LIMIT 1); - -- Greg Sabino Mullane greg@turnstep.com PGP Key: 0x14964AC8 200301301006 -----BEGIN PGP SIGNATURE----- Comment: http://www.turnstep.com/pgp.html iD8DBQE+OT+AvJuQZxSWSsgRAgZOAKCrwW2O/bQpxo5LBBp4vDkS8YoZ9wCg2H7N R9R4CTSXx/lRmjm5NvZkYXE= =VI0G -----END PGP SIGNATURE-----