N
The Daily Insight

What is the range of int data type in SQL?

Author

James Stevens

Updated on March 01, 2026

-2,147,483,647 to 2,147,483,647
The integer data types

SQL integer data typeNumber of bytesRange of values
SMALLINT2-32767 to 32767
INTEGER, INT, SERIAL4-2,147,483,647 to 2,147,483,647
INT8, BIGINT, SERIAL8, BIGSERIAL8-9,223,372,036,854,775,807 to 9,223,372,036,854,775,807

What is range of int data type?

-2,147,483,648 to 2,147,483,647
In this article

Type NameBytesRange of Values
int4-2,147,483,648 to 2,147,483,647
unsigned int40 to 4,294,967,295
__int81-128 to 127
unsigned __int810 to 255

How do you set an int range in SQL?

1 Answer. There is no INT(5) data type in sql server , but you can make use of CHECK constraints to put a limit/Range on values that can be inserted in that column.

What is integer data type in SQL?

Integer data types hold numbers that are whole, or without a decimal point. (In Latin, integer means whole.) ANSI SQL defines SMALLINT , INTEGER , and BIGINT as integer data types. The difference between these types is the size of the number that they can store.

What are the limits of int datatype?

The INTEGER data type stores whole numbers that range from -2,147,483,647 to 2,147,483,647 for 9 or 10 digits of precision. The number 2,147,483,648 is a reserved value and cannot be used.

What is the limit of INT?

2147483647
Limits on Integer Constants

ConstantMeaningValue
INT_MINMinimum value for a variable of type int .-2147483648
INT_MAXMaximum value for a variable of type int .2147483647
UINT_MAXMaximum value for a variable of type unsigned int .4294967295 (0xffffffff)
LONG_MINMinimum value for a variable of type long .-2147483648

What is the range of long int?

long int : -2,147,483,647 to 2,147,483,647.

What is the length of int in SQL Server?

In this article

Data typeRangeStorage
bigint-2^63 (-9,223,372,036,854,775,808) to 2^63-1 (9,223,372,036,854,775,807)8 Bytes
int-2^31 (-2,147,483,648) to 2^31-1 (2,147,483,647)4 Bytes
smallint-2^15 (-32,768) to 2^15-1 (32,767)2 Bytes
tinyint0 to 2551 Byte

How long is integer data type?

The INTEGER data type stores whole numbers that range from -2,147,483,647 to 2,147,483,647 for 9 or 10 digits of precision. The number 2,147,483,648 is a reserved value and cannot be used. The INTEGER value is stored as a signed binary integer and is typically used to store counts, quantities, and so on.

What is the max range of integer?

32-bit signed integer in 2’s complement representation has the range -231 to 231-1 which is equal to -2,147,483,648 to 2,147,483,647. A 32 bit integer ranges from -2,147,483,648 to 2,147,483,647.

What are the different data types in SQL Server?

SQL Server supports different data types, including primitive types such as Integer, Float, Decimal, Char (including character strings), Varchar (variable length character strings), binary (for unstructured blobs of data), Text (for textual data) among others.

What is the maximum integer in SQL Server?

The maximum values for an integer in SQL Server are: -2147483648 through 2147483647 And the byte size is 4 bytes.

What is a data type in SQL Server?

SQL Server data type is an attribute that specifies types of data of any object. Each column, variable and expression has related data type in SQL Server. These data types can be used while creating tables.

What is smallint SQL Server?

Term: SMALLINT. Definition: In Oracle PL/SQL, SMALLINT is an ANSI SQL data type which is supported by Oracle as NUMBER(38). It use is supported in SQL as well as PL/SQL operations.