significance of index name in creating an index (mySQL)
Posted
by
Will
on Stack Overflow
See other posts from Stack Overflow
or by Will
Published on 2011-01-05T05:35:55Z
Indexed on
2011/01/05
5:53 UTC
Read the original article
Hit count: 172
I've done something like this in order to use on duplicate key update
:
CREATE UNIQUE INDEX blah on mytable(my_col_to_make_an_index);
and its worked just fine. I'm just not sure what the purpose of the index name is -- in this case 'blah'. The stuff I've read says to use one but I can't fathom why. It doesn't seem to be used in queries, although I can see it if I export the schema.
So ... what purpose does the index name serve? If it helps the line in the CREATE TABLE
ends up looking like:
UNIQUE KEY `clothID` (`clothID`)
© Stack Overflow or respective owner