pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: val@webtribe.net
To: pgsql-sql@postgresql.org
Subject: Delete 1 Record of 2 Duplicate Records
Date: Thu, 30 Jan 2003 11:52 +0000
Message-ID: <20030130115201.D4EB21833A@cheetah.webtribe.net> (raw)

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.



view thread (4+ messages)  latest in thread

Message-ID: <20030130115201.D4EB21833A@cheetah.webtribe.net>
Permalink:  ../20030130115201.D4EB21833A@cheetah.webtribe.net/
Also on:    postgresql.org/message-id/20030130115201.D4EB21833A@cheetah.webtribe.net

 · 

reply

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: val@webtribe.net
  Subject: Re: Delete 1 Record of 2 Duplicate Records
  In-Reply-To: <20030130115201.D4EB21833A@cheetah.webtribe.net>

* 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