Re: [GENERAL] Selecting duplicates
Re: [GENERAL] Selecting duplicates
От:
Herbert Liechti <Herbert.Liechti@thinx.ch>
Дата:
-- ~Adriaan Joubert wrote: > Gary Hoffman wrote: > > > > Somehow, I've managed to get duplicate entries in my soon-to-be primary > > key field. How can I select for duplicates in a field? I know how to > > select for blank and NULL, but duplicates escape me. > > Sorry, I only know complicated ways of doing this. The way I usually do > it is to create a temporary table: > > create temp table tmp (id int4, cnt int4); > insert into tmp select id, count(*) from