You Are Here Home > Create An Index

Create An Index

Assuming you want to create the index ‘name’ on column ‘name’ on table ‘test’:

ALTER TABLE test ADD INDEX name (name) ;

Where the first ‘name’ is the name of the index and the ‘name’ in parenthesis is the column name.

If you want to index 2 columns:

ALTER TABLE test ADD INDEX name (name, pass) ;
Create An Index
Filed under: MySQL   Posted by: Hamid

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment