Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9247597
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:46:10+00:00 2026-06-18T09:46:10+00:00

I have a question regarding DB. Lets say I have id column which is

  • 0

I have a question regarding DB. Lets say I have id column which is primary key. And 4 rows. Once i remove the row 0 the 1st row must become row 0 in that table. once you set table ID as auto_increment, does it do that trick?
Best regards

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T09:46:12+00:00Added an answer on June 18, 2026 at 9:46 am

    Succinctly, No.

    That is, once an auto increment column is assigned a value, it stays with the assigned value in perpetuity.

    Think about it; suppose you have a table with a million and one rows in it. If you delete the row with ID 0 and then want to renumber the remaining rows, not only do you have to update each and every one of the remaining million rows, you also have to cascade those updates to the referencing foreign keys in other tables. You’ve just demanded a rewrite of a significant portion of the database. Which is bad for concurrency, and log file usage, and just about everything else (every report that mentioned the ID number for a still existing row is obsolete). Think what would happen to you if your bank account number changed any time someone else closed their account!

    Filling in gaps like you seem to be asking about is usually not necessary.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a question regarding foreign key in entity framework(EF4). Lets say i have
I have a question regarding events in c#. Lets say I have an object
I have a question regarding git repository management. Lets say I want to create
I have a general question regarding synchronized List. Lets say that in the constructor
I have a general question regarding listeners. Lets say I have two JTabbedPane s
i have a question regarding defining objects in modules. lets say i have a
I have a question regarding .ajaxComplete(). Lets say I do this: // Register an
I have a question regarding EC2. Let's say I have a pure EC2 instance
I've got a question regarding multiple-thread method invocation in Java. Let's say we have
I asked this question earlier but regarding another programming languages. Let's say I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.