How to delete duplicate rows?

Поиск
Список
Период
Сортировка
Искать
От
Clodoaldo Pinto
Тема
How to delete duplicate rows?
Дата
Msg-id
a595de7a050203170413607077@mail.gmail.com
Список
Дерево обсуждения
How to delete duplicate rows? Clodoaldo Pinto <clodoaldo.pinto@gmail.com>
Re: How to delete duplicate rows? Bruno Wolff III <bruno@wolff.to>
Re: How to delete duplicate rows? John Sidney-Woollett <johnsw@wardbrook.com>
This one must be obvious for most here.

I have a 170 million rows table from which I want to eliminate
duplicate "would be" keys and leave only uniques.

I found a query in http://www.jlcomp.demon.co.uk/faq/duplicates.html
for the oracle database but can't figure out how to refer to the row
id in postgresql:

delete from test where rowid not in 
(select min(rowid) from test group by a,b);

How to refer to the row id? Any better way to do it?

Regards, Clodoaldo Pinto
В списке pgsql-general по дате отправления
От: Mike Nolan
Дата:
От: David Fetter
Дата:
FAQ