Re: [SQL] Duplicate rows

Поиск
Список
Период
Сортировка
От Bruce Stephens
Тема Re: [SQL] Duplicate rows
Дата
Msg-id m3wwbme2l8.fsf@cenderis.demon.co.uk
обсуждение исходный текст
Ответ на Re: [SQL] Duplicate rows  (Andy Lewis <alewis@mpsi.net>)
Список pgsql-sql
Andy Lewis <alewis@mpsi.net> writes:

> Right, I know that there are dups in the column. But, I don't know
> where they are nor do I know their value(s). I want to be able to
> find, say, two interger values that are in the same column but,
> different rows.

How about

SELECT t1.col,t1.oid, t2.oid FROM fred AS t1, fred AS t2
    WHERE t1.col=t2.col AND t1.oid<t2.oid

(I haven't tested this, but it's the right kind of idea: select the
interesting bits from a self-join.)

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

Предыдущее
От: Oleg Broytmann
Дата:
Сообщение: Re: [SQL] Duplicate rows
Следующее
От: Andy Lewis
Дата:
Сообщение: Re: [SQL] Duplicate rows