I’m trying to modify a table inside my PostgreSQL database, but it says there is duplicate! what is the best way to find a duplicate value inside a table? kinda a select query?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you try to change a value in a column that is part of the
PRIMARY KEYor has aUNIQUEconstraint and get this error there, then you should be able to find the conflicting row byIf conflicting_value is a character type, put it in single quotes (
').EDIT: To find out which columns are affected by the constraint, check this post.