How to remove duplicate lines but save one of the lines?

From: "A B" <gentosaker(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: How to remove duplicate lines but save one of the lines?
Date: 2008-07-21 15:33:59
Message-ID: dbbf25900807210833y649b5d0as21d18282dd28aa13@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have a table with rows like this
A 1
A 1
B 3
B 3
C 44
C 44
and so on.

and I want it to be
A 1
B 3
C 44

so how can I remove the all the duplicate lines but one?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Raymond O'Donnell 2008-07-21 15:41:34 Re: How to remove duplicate lines but save one of the lines?
Previous Message Richard Huxton 2008-07-21 14:18:35 Re: Problems using Grails with Postgresql