Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Server int length property

I've got a SQL Server database. One of my tables has a column called id which is incremented automatically when I create a new project in a program that is connected to the database. Right now the highest id is 9175. Now I'm worried that the highest possible is is 9999. I checked the properties of the id column, see the below picture.

The "Length" property says 4. What does this mean for an int? Does it mean that the database will not accept an id of 10000? How can I find out?

enter image description here

like image 880
mike Avatar asked Nov 15 '25 05:11

mike


1 Answers

In SQL Server INT has range:

int -2^31 (-2,147,483,648) to 2^31-1 (2,147,483,647) 4 Bytes

Length 4 in case of INT is indicator of size(4 bytes).

like image 173
Lukasz Szozda Avatar answered Nov 17 '25 20:11

Lukasz Szozda