Skip to content

Commit ab7a2e6

Browse files
authored
Separate range and range expression
1 parent 573fd0b commit ab7a2e6

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

docs/t-sql/data-types/int-bigint-smallint-and-tinyint-transact-sql.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ monikerRange: ">=aps-pdw-2016||=azuresqldb-current||=azure-sqldw-latest||>=sql-s
3131

3232
Exact-number data types that use integer data. To save space in the database, use the smallest data type that can reliably contain all possible values. For example, tinyint would be sufficient for a person's age because no one lives to be more than 255 years old. But tinyint would not be sufficient for a building's age because a building can be more than 255 years old.
3333

34-
|Data type|Range|Storage|
35-
|---|---|---|
36-
|**bigint**|-2^63 (-9,223,372,036,854,775,808) to 2^63-1 (9,223,372,036,854,775,807)|8 Bytes|
37-
|**int**|-2^31 (-2,147,483,648) to 2^31-1 (2,147,483,647)|4 Bytes|
38-
|**smallint**|-2^15 (-32,768) to 2^15-1 (32,767)|2 Bytes|
39-
|**tinyint**|2^0-1 (0) to 2^8-1 (255)|1 Byte|
34+
|Data type|Range|Range expression|Storage|
35+
|---|---|---|---|
36+
|**bigint**| -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 | -2^63 to 2^63-1 | 8 Bytes|
37+
|**int**| -2,147,483,648 to 2,147,483,647 |-2^31 to 2^31-1 | 4 Bytes|
38+
|**smallint**| -32,768 to 32,767 |-2^15 to 2^15-1 | 2 Bytes|
39+
|**tinyint**| 0 to 255 |2^0-1 to 2^8-1 | 1 Byte |
4040

4141
## Remarks
4242
The **int** data type is the primary integer data type in [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)]. The **bigint** data type is intended for use when integer values might exceed the range that is supported by the **int** data type.

0 commit comments

Comments
 (0)