From: Achilleus Mantzios <achill@matrix.gatewaynet.com>
To: val@webtribe.net
Cc: pgsql-sql@postgresql.org
Subject: Re: Delete 1 Record of 2 Duplicate Records
Date: Thu, 30 Jan 2003 14:00:07 -0200 (GMT+2)
Message-ID: <Pine.LNX.4.44.0301301359000.25269-100000@matrix.gatewaynet.com> (raw)
In-Reply-To: <20030130115201.D4EB21833A@cheetah.webtribe.net>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: achill@matrix.gatewaynet.com, val@webtribe.net
Subject: Re: Delete 1 Record of 2 Duplicate Records
In-Reply-To: <Pine.LNX.4.44.0301301359000.25269-100000@matrix.gatewaynet.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox