Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 235
Rivka Avatar asked Dec 22 '11 14:12

Rivka


1 Answers

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

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

like image 88
Joe Stefanelli Avatar answered Oct 13 '22 01:10

Joe Stefanelli