iainlang Posted May 31, 2008 Share Posted May 31, 2008 I've searched the Knowledge Base but couldn't find anything which answered my question. I have an auto-increment id field in my tables which (for reasons of displaying the unsigned zerofill in limited screen space) I want to replace with a new auto-increment id field which will, of course, start again at 0. In phpMyAdmin, I delete the existing auto-increment id field and, when trying to install a new one, I get - "ALTER TABLE `help` ADD `id` SMALLINT( 2 ) UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT FIRST MySQL said: #1075 - Incorrect table definition; there can be only one auto column and it must be defined as a key " I expect it's something terribly simple and I'm just being stupid. Can anyone help, please? Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted May 31, 2008 Share Posted May 31, 2008 needs to be PRIMARY KEY, too. when adding the field, check the key checkbox. Quote Link to comment Share on other sites More sharing options...
iainlang Posted May 31, 2008 Author Share Posted May 31, 2008 Thank you for your swift response. I do check the PRIMARY BOX radio button, always did, but still get the same error message. Quote Link to comment Share on other sites More sharing options...
iainlang Posted June 1, 2008 Author Share Posted June 1, 2008 Friendly bump. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.