Mega Code Archive

 
Categories / MySQL / Table Index
 

There are four types of statements for adding indexes to a table

ALTER TABLE tbl_name ADD PRIMARY KEY (column_list); ALTER TABLE tbl_name ADD UNIQUE index_name (column_list); ALTER TABLE tbl_name ADD INDEX index_name (column_list); ALTER TABLE tbl_name ADD FULLTEXT index_name (column_list);