name | description | example |
---|---|---|
PRIMARY | 1) only one PRIMARY in the table. 2) like UNIQUE, have to be unique. 3) unlike UNIQUE, it is to identify the cell, so not allow NULL value. 4) InnoDB engine order the table according to PRIMARY | ID |
INDEX | 1) allow identical values 2) for quickly reaching certain ranges of records without scanning all records. | user_login |
UNIQUE | 1) unique | |
FULLTEXT | ||
SPATIAL |