Re: [GENERAL] Delete Duplicates with Using

Поиск
Список
Период
Сортировка
От Igal @ Lucee.org
Тема Re: [GENERAL] Delete Duplicates with Using
Дата
Msg-id 93fad16b-6490-6257-ec04-d43e49ff6025@lucee.org
обсуждение исходный текст
Ответ на Re: [GENERAL] Delete Duplicates with Using  (legrand legrand <legrand_legrand@hotmail.com>)
Список pgsql-general
On 10/14/2017 12:32 AM, legrand legrand wrote:
> DELETE FROM table_with_duplicates AS T1 USING table_with_duplicates AS T2
> WHERE
>          T1.column_1 = T2.column_1
>          AND T1.column_2 = T2.column_2
>          AND T1.column_3 = T2.column_3
>          AND T1.row_num < T2.row_num

Thank you, I actually thought about that at first but it seemed "too 
easy" and I was looking for some solution with JOIN.

Anyway, this seems to work great.

Thanks,


Igal


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

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

Предыдущее
От: Melvin Davidson
Дата:
Сообщение: Re: [GENERAL] Non-overlapping updates blocking each other
Следующее
От: "Igal @ Lucee.org"
Дата:
Сообщение: [GENERAL] Adding identity column to a non-empty table