public inbox for [email protected]
help / color / mirror / Atom feedFrom: [email protected]
To: 'Sajjad Abid' <[email protected]>
To: 'Diomedes Dominguez' <[email protected]>
Cc: [email protected]
Subject: RE: Reg. Postgres Unique contraint
Date: Fri, 27 Dec 2024 12:54:52 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <CANjRhAHar1rAAHtAZj3jkvAJc_HL5973O=zpgRWhcMfxp+rXLA@mail.gmail.com>
References: <CANjRhAF0yQ2k0cQXGe=00UJD9W4N2thXoC6=e-pVXk_YEOM-6w@mail.gmail.com>
<CAJMOeFhLSaVo99uGF55tSnaDJdRdDY7BM8CQuN=asiM80QhfPQ@mail.gmail.com>
<CANjRhAHar1rAAHtAZj3jkvAJc_HL5973O=zpgRWhcMfxp+rXLA@mail.gmail.com>
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 <[email protected]>
Envoyé : mercredi 27 novembre 2024 05:28
À : Diomedes Dominguez <[email protected]>
Cc : [email protected]
Objet : Re: Reg. Postgres Unique contraint
Version of Postgres is 12.9
On Wed, Nov 27, 2024 at 9:49 AM Diomedes Dominguez <[email protected] <mailto:[email protected]> > wrote:
Which version of Postgres are you using?
El mié, 27 de nov de 2024, 00:14, Sajjad Abid <[email protected] <mailto:[email protected]> > 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
view thread (7+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: RE: Reg. Postgres Unique contraint
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox