Search code examples
sqlauto-increment

Max Size of SQL Server Auto-Identity Field


What is the max size of SQL Server identity field (int)?

I am deleting and inserting hundereds of records at a time a few times a day in a few tables and I'm curious what effect this will have regarding the auto-identity field.

I can run a job every night or so and truncate this data, if needed.

I'd appreciate your thoughts.

Thank you.


Solution

  • An INT will take you up to 2,147,483,647.

    A BIGINT will get you 9,223,372,036,854,775,807.