Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do you change mysql table properties

Status
Not open for further replies.

dunskii

Programmer
Sep 14, 2001
107
AU
Hi there,

I am trying to change a table that is already indexed.

i tried: ALTER TABLE TableName Modify IntField INT NOT NULL AUTO_INCREMENT;

but it says: there can only be one auto column and it must be a key

I havent set a key or another auto column

thanks for all your help

dunskii
 
ALTER TABLE TableName Modify IntField INT NOT NULL AUTO_INCREMENT PRIMARY KEY;


Anikin
Hugo Alexandre Dias
Web-Programmer
anikin_jedi@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top