Excerpt from: http://stackoverflow.com/questions/5317889/sql-keys-mul-vs-pri-vs-uni/15268888#15268888
SQL keys, MUL vs PRI vs UNI
DESCRIBE <table>;
Acutally a shortcut for:
SHOW COLUMNS from <table>;
In any case, there is three possible values for the "Key" attribute:
The meaning of the PRI and UNI are quite clear:
PRI = Primary Key
Uni=> Unique Key
The third possibility, MUL, (which you asked on) is basically an index, which is neither a primary key nor a unique key. The name comes from "multiple" because multiple occurences of the same value is allowed. Straight from the MySQL documentation:http://dev.mysql.com/doc/refman/5.1/en/show-columns.html
"If Key is MUL, the column was the first column of a nonunique index in which multiple occurrences of a given value was per Mitted within the column. "
There is also a final caveat:
"If more than one of the keys values applies to a given column of a table, Key displays the one with the highest priority, In the order PRI, UNI, MUL. "
As a general note, the MySQL documentation is quite good. When in doubt, check it out!
====end====
SQL keys, MUL vs PRI vs UNI