Re: how to find duplicates key

From: Heath Tanner <heath(at)inligo(dot)com>
To: valval(at)porta(dot)net
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: how to find duplicates key
Date: 2003-09-15 20:37:26
Message-ID: 6ABD3730-E7BC-11D7-8C53-0003930C11A0@inligo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Monday, September 15, 2003, at 04:01 PM, Christian Valverde wrote:

> how do i find a duplicate key so i can make a unique index

SELECT my_key, count(*) FROM my_table GROUP BY my_key HAVING count(*) >
1;

-heath

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Mickey 2003-09-16 03:31:07 FATAL errors a plenty
Previous Message Christian Valverde 2003-09-15 20:01:05 how to find duplicates key