Re: [HACKERS] Should the following work...? - Mailing list pgsql-hackers

From Clark Evans
Subject Re: [HACKERS] Should the following work...?
Date
Msg-id 37011C5E.459FC923@manhattanproject.com
Whole thread Raw
In response to RE: [HACKERS] Should the following work...?  (The Hermit Hacker <scrappy@hub.org>)
Responses Re: [HACKERS] Should the following work...?
List pgsql-hackers
The Hermit Hacker wrote:
> To find duplicate records, or, at least,
> data in a particular field, he suggests 
> just doing:
> 
>    SELECT id,count(1)
>      FROM clients
>  GROUP BY id
>    HAVING count(1) > 1;
> 
> A nice, clean, simple solution :)

Ya.  That's pretty.  For some
reason I always forget using the
'HAVING' clause, and end up using
a double where clause.  

:) Clark


pgsql-hackers by date:

Previous
From: Clark Evans
Date:
Subject: Re: [HACKERS] Should the following work...?
Next
From: The Hermit Hacker
Date:
Subject: Re: [HACKERS] Should the following work...?