Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

query to find rows that violate what used to be a unique constraint

695392Dec 14 2012 — edited Dec 15 2012
Hi,

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
This post has been answered by Martin Preiss on Dec 14 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 12 2013
Added on Dec 14 2012
8 comments
3,350 views