Re: contracting tables

Поиск
Список
Период
Сортировка
Искать
От
Markus Bertheau
Тема
Re: contracting tables
Дата
Msg-id
1007106809.1107.11.camel@entwicklung01.cenes.de
Ответ на
contracting tables (Peter T. Brown)
Список
Дерево обсуждения
Re: contracting tables merlyn@stonehenge.com (Randal L. Schwartz)
On Fri, 2001-11-30 at 00:50, Peter T. Brown wrote:
> I have a table with many records, some of which are duplicates (there is no
> unique constraints). How can I contract this table to remove any of these
> duplicate records? Like when using GROUP BY in a select statement, except
> that I want to just remove the extra entries from this table directly... Any
> ideas?

If I understood you right, one problem is to identify only one row of a
duplicate. There is a 'hidden' field oid in every table that is unique.
It goes like this: 

select oid, * from 

So you could delete the rows by oid:

delete from  where oid = 

HTH

Markus Bertheau


В списке pgsql-sql по дате отправления
От: Christopher Kings-Lynne
Дата:
От: Christopher Kings-Lynne
Дата:
Сообщение: Re: contracting tables
FAQ