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) ;
Hamid Alipour is a partner in Codehead, LLP with his wife, Tess. Hamid speaks 12 markup and programming languages [Yes, 12: PHP, CSS, Ajax, JavaScript, HTML/XHTML, Java, Python, C/C++, ASP, Visual Basic, Scheme and Action Script]; has a penchant for solving the unsolvable; an affinity for clean, hand-written code and is a Zend Certified 