query to find rows that violate what used to be a unique constraint
695392Dec 14 2012 — edited Dec 15 2012Hi,
I had a table including 2 columns (userName, nodeId) that used to form a unique constraint as a pair. The boss asked to relax the contraint, and allow different rows with that same pair under certain conditions. Now, he wants to put back the unique contraint.
Is there a query that can find all rows whose pair (userName, nodeId) has another row with the same pair? (So I can clean up the database before putting back the unique constraint?)
Andy