futrose Posted February 11, 2011 Share Posted February 11, 2011 I have already created my table and I forgot to add AUTO_INCREMENT to my ID row. I can't seem to find the SQL command to put it in. I think it is something like alter table elders modify extra auto_increment... I'm not sure how to specify that it should only add it to the ID row and not all of them. By the way I'm using the command line, I don't have phpmysqladmin installed at the moment. Thanks. Link to comment https://forums.phpfreaks.com/topic/227354-add-auto_increment-to-a-row-when-table-is-already-created/ Share on other sites More sharing options...
bh Posted February 11, 2011 Share Posted February 11, 2011 You have to modify the column: ALTER TABLE table_name MODIFY COLUMN column_name INT AUTO_INCREMENT; Link to comment https://forums.phpfreaks.com/topic/227354-add-auto_increment-to-a-row-when-table-is-already-created/#findComment-1172687 Share on other sites More sharing options...
futrose Posted February 11, 2011 Author Share Posted February 11, 2011 worked beautifully... Thanks a lot. Link to comment https://forums.phpfreaks.com/topic/227354-add-auto_increment-to-a-row-when-table-is-already-created/#findComment-1172688 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.