RE: Reg. Postgres Unique contraint

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

 

Does the following query return something:

 

Select user_name, count(*) from your_table group by user_name having count(*) > 1

 

Best regards

 

Michel SALAIS

 

De : Sajjad Abid <abidsajjad@xxxxxxxxx>
Envoyé : mercredi 27 novembre 2024 05:28
À : Diomedes Dominguez <diomedes.dominguez@xxxxxxxxx>
Cc : pgsql-performance@xxxxxxxxxxxxxxxxxxxx
Objet : Re: Reg. Postgres Unique contraint

 

Version of Postgres is 12.9

 

On Wed, Nov 27, 2024 at 9:49AM Diomedes Dominguez <diomedes.dominguez@xxxxxxxxx> wrote:

Which version of Postgres are you using?

 

El mié, 27 de nov de 2024, 00:14, Sajjad Abid <abidsajjad@xxxxxxxxx> escribió:

A column is character varying(50), also on this column a unique constraint is defined, but I found some duplicate values in this column for some records

  user_name character varying(50) 

  CONSTRAINT  user_name_unq   UNIQUE ( user_name )

 

Kindly help me to resolve this issue.

 

--

Thanks & Regards,

Sajjad Abid


 

--

Thanks & Regards,

Sajjad Abid


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux