Search Postgresql Archives

Re: Duplicate Row Removal

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

 



CREATE TABLE new_name AS SELECT DISTINCT * FROM old_name;

DROP TABLE old_name;

ALTER TABLE new_name RENAME TO old_name;

On 2005-11-04 17:15, Peter Atkins wrote:
All,

I have a duplicate row problem and to make matters worse some tables don't have a PK or any unique identifier.
Anyone have any thoughts on how to remove dups?


---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

[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 Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux