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

  • SEARCH
  • Home
  • 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 6008331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:48:32+00:00 2026-05-23T01:48:32+00:00

Most database support autogenerate for an INT field, mostly used as the key for

  • 0

Most database support autogenerate for an INT field, mostly used as the key for that table. It sometimes is set named id for short.

how much time before the program lets say c# int and the database INT value no longer support each other, or how long before the INT value is used up, or how large is this auto generated id field for a database, lets say sqlite?

When you try to insert a new record, and the data base auto generated row id is used up, what happens; no more insert?

thanks

[EDIT]

Do you look at the ID values of your tables once in a while?

Most people don’t know that if for some reason you app does alot of insert and delete, then a new ID value is generated each time you insert. is seems that databases does not reuse deleted ID, so in that case a database with just 1000 records can use up that value if the app does alot of insert and deleteing!!!

The reason i asked this question is this, normally in apps you frequently make use of the ID value, to keep track of records; i do always.

lest say i did somthing like this

int record_id= reader("id").value;

when will i get an overflow error?
is the database INT the same as int in all programing environment?

  • 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-23T01:48:33+00:00Added an answer on May 23, 2026 at 1:48 am

    I don’t know about sqlite but for the SQL Server the maximum values look like this:

    max int (32 bit) = 2,147,483,647
    max bigint (64 bit) = 9,223,372,036,854,775,807
    

    If at some point you’ve used up the value range then an attempt to insert a new record will fail. It will say the following:

    Arithmetic overflow error converting IDENTITY to data type int. Arithmetic overflow occurred.

    Again, have no idea about sqlite but in SQL Server the failed transactions will also consume a value from the pool. If you attempt an insert and the containing transaction is rolled back then the generated IDENTITY value will not be returned to the pool. If you have transactions failing regularly then that will also waste a certain ( though very small) percentage of the values.

    Most likely sqlite works in a similar way.

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

Sidebar

Related Questions

Address records are probably used in most database, but I've seen a number of
I have an application that is database intensive. Most of the applications methods are
Modern database provide caching support. Most of the ORM frameworks cache retrieved data too.
I want to save pictures(mostly JPEG) to MySQL database. I saw most people say
I have some data in MySQL database that are static most of the time.
I would like to cache my most database heavy actions in my asp.net-mvc site.
This is probably the most classic database problem. I have an E-commerce software solution
Generally the database server is the biggest, most expensive box we have to buy
What is the most efficient way to store large arrays (10000x100) in a database,
I work on a database driven website. Most pages' titles are the names of

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.