RE: Two questions in a row

Поиск
Список
Период
Сортировка
От Andrew Snow
Тема RE: Two questions in a row
Дата
Msg-id NHEALMDKDACEIPBNOOOCCEPNCGAA.als@fl.net.au
обсуждение исходный текст
Ответ на Re: Two questions in a row  (Gilles DAROLD <gilles@darold.net>)
Список pgsql-general
> > 1. How do you remove one of two identical rows
> > from a pgsql table ?
>
> DELETE FROM t1 WHERE .... wil do the stuff for you. If you don't know
> the value into the duplicate field just export the database with pg_dump
> create
> a unique index onto this field and reimport all your data. Duplicate
> data will
> not be inserted.

Another way could be to
SELECT oid FROM table WHERE ...;

and then delete based on that. However I believe it is possible to have two
rows have the same oid but usually that isn't the case.




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

Предыдущее
От: Gilles DAROLD
Дата:
Сообщение: Re: Two questions in a row
Следующее
От: Mike Mascari
Дата:
Сообщение: Re: Two questions in a row