Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.