int data type

How many digits of number int data type can store?  I would to use int data type for record_key field which will have multi millions of records.. would int data type be enough for this ?
Who is Participating?
2GB - if you need to go higher than use bigint

From BOL


Has a length of 8 bytes and stores numbers from 2^63 (-9,223,372,036,854,775,808) through 2^63-1 (9,223,372,036,854,775,807).

integer or int

Has a length of 4 bytes, and stores numbers from -2,147,483,648 through 2,147,483,647.


Has a length of 2 bytes, and stores numbers from -32,768 through 32,767.


Has a length of 1 byte, and stores numbers from 0 through 255.

Patrick MatthewsCommented:
int tops out at about 2.1 billion, so you should be safe :)
On "32-bit" machines the int data type takes up 4 bytes (232). The short is usually smaller, the long can be larger or the same size as an int and finally the long long is for handling very large numbers.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.