Delete 1 Record of 2 Duplicate Records

From: val(at)webtribe(dot)net
To: pgsql-sql(at)postgresql(dot)org
Subject: Delete 1 Record of 2 Duplicate Records
Date: 2003-01-30 11:52:00
Message-ID: 20030130115201.D4EB21833A@cheetah.webtribe.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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 "limit"

I'm using version 7.2.1

Thank you.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Christoph Haller 2003-01-30 13:10:41 Re: double linked list
Previous Message David Durst 2003-01-30 10:18:17 Question about passing User defined types to functions