Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL Query - Selecting records that repeat / occur more than once in a table -- newbe question
On 11 Feb 2004, nbsj67_at_yahoo.com wrote:
> I need to find customer's names that repeat / occur more than
> once in the same table. I have treid many options and I have
> tried comparing the column to itself but Oracle gives me an
> error.
select cust_nm, count(*)
from table
group cust_nm
having count(*) > 1;
-- Galen BoyerReceived on Wed Feb 11 2004 - 22:28:07 CST