The documentation for MySQL index types is hidden in the page on CREATE TABLE Syntax and isn’t as clear as it could be. Here’s an overview. (some of this is pretty obvious but I’m erring on the side of redundancy).
KEYandINDEXare synonyms and mean that the colum should be indexed, and do NOT require the column to be uniqueUNIQUEis uniquePRIMARY KEY:- is an index
- implies that all the columns are
UNIQUE - all columns in the key must be defined as
NOT NULL - a table can only have one
PRIMARY KEY
Let me know if I’m missing anything.
fulltext?
I think fulltext is missing