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 4051428
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T14:11:37+00:00 2026-05-20T14:11:37+00:00

If you add a new record, then delete the record, then add it again

  • 0

If you add a new record, then delete the record, then add it again over and over, in time, sooner or later, when you add a new record the integer primary key id, it will eventually exceed 2 billion.

  1. Now what happens? SQL Server will start the primary key id from 1 again? or -1?

  2. What happens if it cycles 4 billion times; how does SQL Server know not to replace the previous data?

  • 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-05-20T14:11:38+00:00Added an answer on May 20, 2026 at 2:11 pm

    You get an error if the identity would exceed the bounds of the datatype making the rest of your question moot. You can see this by

    CREATE TABLE #T
    (
    id INT IDENTITY(2147483647,1)
    )
    
    INSERT INTO #T
    DEFAULT VALUES
    
    INSERT INTO #T
    DEFAULT VALUES /*Arithmetic overflow error converting IDENTITY to data type int.*/
    
    GO
    
    SELECT * FROM #T
    
    DROP TABLE #T
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How to add new css class or id and then write properties for html
I'm wondering if its possible to add new class data members at run-time in
For example if I have an auto-numbered field, I add new records without specifying
For example: root.Nodes.Add(new TNode() { Foo1 = bar1, Foo2 = bar2, Foo3 = bar3
Can I add new Silverlight 2.0 projects to my ASP.NET 2.0 web app and
I'm trying to add new output column using synchronous custom data flow component(below is
How to add new hyperlink column to an asp.net gridview where columns are autogenerated?
how to add new column in new DataTable But Erorr private void LoadtoList() {
When I attempt to add new item to my web project (by right-clicking, add
Is it possible to add new codec's to ffmepg? i searched a bit and

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.