Search Postgresql Archives

Removing duplicate rows in table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've no idea how I entered multiple, identical rows in a table but I want to
delete all but one of these rows.

Here's an example:

bustrac=# select * from projects where proj_nbr = '4242.01';
proj_nbr | proj_name | start_date | end_date | description | notes ----------+----------------+------------+------------+---------------+-------
 4242.01  | Expert witness | 2008-10-15 | 2008-10-28 | Consol Energy |
 4242.01  | Expert witness | 2008-10-15 | 2008-10-28 | Consol Energy |
 4242.01  | Expert witness | 2008-10-15 | 2008-10-28 | Consol Energy |
4242.01 | Expert witness | 2008-10-15 | 2008-10-28 | Consol Energy | (4 rows)

How do I clean this up so there's only a single row for this project number?

TIA,

Rich





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux