Re: Delete 1 Record of 2 Duplicate Records - Mailing list pgsql-sql

From Achilleus Mantzios
Subject Re: Delete 1 Record of 2 Duplicate Records
Date
Msg-id Pine.LNX.4.44.0301301359000.25269-100000@matrix.gatewaynet.com
Whole thread Raw
In response to Delete 1 Record of 2 Duplicate Records  (val@webtribe.net)
List pgsql-sql
On Thu, 30 Jan 2003 val@webtribe.net 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
> ---------------------+--------------
>  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 "limit"
>
> I'm using version 7.2.1
>
> Thank you.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>

==================================================================
Achilleus Mantzios
S/W Engineer
IT dept
Dynacom Tankers Mngmt
Nikis 4, Glyfada
Athens 16610
Greece
tel:    +30-10-8981112
fax:    +30-10-8981877
email:  achill@matrix.gatewaynet.com       mantzios@softlab.ece.ntua.gr



pgsql-sql by date:

Previous
From: val@webtribe.net
Date:
Subject: Delete 1 Record of 2 Duplicate Records
Next
From: Christoph Haller
Date:
Subject: Re: double linked list