Jump to content

simple sql question


contra10

Recommended Posts

I just want to know that if i have an auto incremented table and the auto incremented numbers are lets say 1,2,3,4 to represent each row.

 

If i delete row 2, whats left in my database is 1,3,4. The next input would be 5. 1,3,4,5.

 

Question: Is there a way to allow the next created row to be 2 instead of being 5?

 

I guess I'm just trying to reorganize

Link to comment
https://forums.phpfreaks.com/topic/153702-simple-sql-question/
Share on other sites

if you want that kind of control over an ID column, i'd suggest not using auto increment and write the code to do it yourself. of course, i'm not sure why one would want to do this. i mean, what value-add to the application and its users would justify this? i make my ID columns unsigned bigints and don't worry about it.

 

jason

Link to comment
https://forums.phpfreaks.com/topic/153702-simple-sql-question/#findComment-807733
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.