Is it possible to write a MySQL query to check the "uniquness" of a combination of columns?
At the moment I have been doing this by attempting to create unique key on the columns in phpmyadmin and seeing if it fails, which is not ideal for lots of reasons.
A query could allow me to find the rows that have the duplicate values in those columns or even count how many rows are causing the combination to not be unique. It would also be nice to know how many different sets of duplicate values there are.
Example with checking columns b, c
a|b|c
-----
1|2|3
4|1|3
1|2|9
no rows for above returned even though two values are the same in b and two values are the same in c.
a|b|c
-----
1|2|3
4|5|6
7|2|3
7|5|6
All rows would be returned or the query could return the sets 2|3 and 5|6 .