dadamssg Posted January 14, 2009 Share Posted January 14, 2009 Im pretty sure theres someway that mysql can add a ID number to a row everytime one is created. How do that? and i will be deleting and adding rows of data and i want each row to still have that unique ID number. Like if mysql has something where it numbers every data row, i don't want all the numbers to move down one if i delete a row, i want them to remain that same ID number...thanks in advance Quote Link to comment https://forums.phpfreaks.com/topic/140860-automatic-id-attribute/ Share on other sites More sharing options...
trq Posted January 14, 2009 Share Posted January 14, 2009 CREATE TABLE foo ( id INT NOT NULL AUTO_INCREMENT, # # more field definitions. # PRIMARY KEY (id) ); Quote Link to comment https://forums.phpfreaks.com/topic/140860-automatic-id-attribute/#findComment-737274 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.