-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 [EMA
On Thu, 30 Jan 2003 [EMAIL PROTECTED] wrote:
> How do I delete only 1 of the duplicate records?
Do
select oid,* from test where column_id = 5;
then choose which oid to delete
and do
delete from test where oid = ...;
>
>
> column_name | column_id
> -+--
> test
How do I delete only 1 of the duplicate records?
column_name | column_id
-+--
test1 | 5
test1 | 5
I've tried this:
tmp_test=# delete from test where column_id = 5 limit 1;
ERROR: parser: parse error at or near