Re: Removing duplicate rows in table

Поиск
Список
Период
Сортировка
От Rich Shepard
Тема Re: Removing duplicate rows in table
Дата
Msg-id 41c47eb5-f6b-8e29-98e6-f6b1fa733bb@appl-ecosys.com
обсуждение исходный текст
Ответ на Re: Removing duplicate rows in table  (Adrian Klaver <adrian.klaver@aklaver.com>)
Ответы Re: Removing duplicate rows in table
Re: Removing duplicate rows in table
Список pgsql-general
On Tue, 10 Sep 2024, Adrian Klaver wrote:

> You might want to do something like:
>
> select proj_nbr, count(*) as ct from projects group by proj_nbr;
>
> to see how big a problem it is. If it is only a few projects it could just a 
> matter of manually deleting the extras.

Adrian,

It's a small table, not updated in a while. Looking at the example I sent
how do I delete the extras while keeping one when each row has the same
content? Not knowing how to do that is why I wrote.

> Whatever you do:
> 1) Make sure you have a backup of at least that table.
> 2) Do the data changes as BEGIN; <changes> COMMIT; or ROLLBACK;

Yep. Learned that lesson.

Thanks,

Rich

P.S. Please reply to the mail list so I receive only one copy of your
message, not two.



В списке pgsql-general по дате отправления: