How to delete completely duplicate rows

Поиск
Список
Период
Сортировка
От Janek Sendrowski
Тема How to delete completely duplicate rows
Дата
Msg-id trinity-eb3eb934-ffcb-42f8-bb42-7841c964032f-1388578450214@3capp-webde-bs32
обсуждение исходный текст
Ответы Re: How to delete completely duplicate rows
Re: How to delete completely duplicate rows
Список pgsql-general
Hi,
 
I want to delete duplicates in my table. I've dropped the unique constraint to insert my data.
My id value is a hash calculated witch the values of the two other columns.
So I want to delete all columns, which are indentical, but keeping one.
 
DELETE FROM table t1 USING table t2 WHERE t1.id = t2.id AND t1.ctid > t2.ctid

But the oids aren't unique enough.
What else could I do?

Janek


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

Предыдущее
От: "Janek Sendrowski"
Дата:
Сообщение: Re: cast hex to int in plpgsql
Следующее
От: Erik Darling
Дата:
Сообщение: Re: How to delete completely duplicate rows