SQL Server Data Types

Technology 35 records updated 2026-07-17

SQL Server Data Types, with data type, description, max size, and storage.

Get this data

GET https://mysafeinfo.com/api/data/sqlserverdatatypes

JSON XML CSV Download CSV

Sort, page, randomize, and download with query parameters; see the documentation.

Try it live

Run a request against sqlserverdatatypes straight from your browser. Add your API key to lift the row cap and return every record. The call goes to the API and nothing is stored here.

Preview

First 25 of 35 records. Click a column to sort these rows.

ID DataType Description MaxSize Storage
1 char(n) Fixed width character string 8,000 characters Defined width
2 varchar(n) Variable width character string 8,000 characters 2 bytes + number of chars
3 varchar(max) Variable width character string 1,073,741,824 characters 2 bytes + number of chars
4 text Variable width character string 2GB of text data 4 bytes + number of chars
5 nchar Fixed width Unicode string 4,000 characters Defined width x 2
6 nvarchar Variable width Unicode string 4,000 characters
7 nvarchar(max) Variable width Unicode string 536,870,912 characters
8 ntext Variable width Unicode string 2GB of text data
9 binary(n) Fixed width binary string 8,000 bytes
10 varbinary Variable width binary string 8,000 bytes
11 varbinary(max) Variable width binary string 2GB
12 image Variable width binary string 2GB
13 bit Integer that can be 0, 1, or NULL
14 tinyint Allows whole numbers from 0 to 255 1 byte
15 smallint Allows whole numbers between -32,768 and 32,767 2 bytes
16 int Allows whole numbers between -2,147,483,648 and 2,147,483,647 4 bytes
17 bigint Allows whole numbers between -9,223,372,036,854,775,808 and 9,223,372,036,854,775,807 8 bytes
18 decimal(p,s) Fixed precision and scale numbers. Allows numbers from -10^38 +1 to 10^38 –1. The p parameter indicates the maximum total number of digits that can be stored (both to the left and to the right of the decimal point). p must be a value from 1 to 38. Default is 18. The s parameter indicates the maximum number of digits stored to the right of the decimal point. s must be a value from 0 to p. Default value is 0 5-17 bytes
19 numeric(p,s) Fixed precision and scale numbers. Allows numbers from -10^38 +1 to 10^38 –1. The p parameter indicates the maximum total number of digits that can be stored (both to the left and to the right of the decimal point). p must be a value from 1 to 38. Default is 18. The s parameter indicates the maximum number of digits stored to the right of the decimal point. s must be a value from 0 to p. Default value is 0 5-17 bytes
20 smallmoney Monetary data from -214,748.3648 to 214,748.3647 4 bytes
21 money Monetary data from -922,337,203,685,477.5808 to 922,337,203,685,477.5807 8 bytes
22 float(n) Floating precision number data from -1.79E + 308 to 1.79E + 308. The n parameter indicates whether the field should hold 4 or 8 bytes. float(24) holds a 4-byte field and float(53) holds an 8-byte field. Default value of n is 53. 4 or 8 bytes
23 real Floating precision number data from -3.40E + 38 to 3.40E + 38 4 bytes
24 datetime From January 1, 1753 to December 31, 9999 with an accuracy of 3.33 milliseconds 8 bytes
25 datetime2 From January 1, 0001 to December 31, 9999 with an accuracy of 100 nanoseconds 6-8 bytes

Notes