i want to put unique index on two (or more) columns in a table, but i get \"duplicate keys found\". How to select those rows which cause duplication?
You can use Group By and Having for this:
Group By
Having
SELECT col1, col2 FROM table GROUP BY col1, col2 HAVING Count(*) > 1
Basically - group the values, then filter for instances where there is more than one.