Technology · Reference dataset
SQL Server Data Types
SQL Server data types with descriptions, size limits and storage requirements, the category Microsoft places each type in, its rank in data type precedence, and a link to its reference page.
$69 once covers this and 401 other datasets, plus 33 collections, for 365 days. No automatic renewal. Have a pass?

Preview the records
First 5 and last 5 of 40 records · Last changed November 16, 2026 · Select a row to read the whole record.
| Data type | Description | Max size | Storage | Category | Precedence | Docs url |
|---|---|---|---|---|---|---|
| char(n) | Fixed width character string | 8,000 characters | Defined width | Character strings | 29 | https://learn.microsoft.com/en-us/sql/t-sql/data-types/char-and-varchar-transact-sql |
| varchar(n) | Variable width character string | 8,000 characters | 2 bytes + number of chars | Character strings | 28 | https://learn.microsoft.com/en-us/sql/t-sql/data-types/char-and-varchar-transact-sql |
| varchar(max) | Variable width character string | 2^31-1 bytes (2 GB) | 2 bytes + number of chars | Character strings | 28 | https://learn.microsoft.com/en-us/sql/t-sql/data-types/char-and-varchar-transact-sql |
| text | Variable width character string | 2GB of text data | 4 bytes + number of chars | Character strings | 22 | https://learn.microsoft.com/en-us/sql/t-sql/data-types/ntext-text-and-image-transact-sql |
| nchar | Fixed width Unicode string | 4,000 characters | Defined width x 2 | Unicode character strings | 27 | https://learn.microsoft.com/en-us/sql/t-sql/data-types/nchar-and-nvarchar-transact-sql |
| 30 more records · Download options | ||||||
| json | Stores JSON documents in a binary format optimized for querying and manipulation. Available in SQL Server 2025, Azure SQL Database and Azure SQL Managed Instance | 2 GB | Other data types | 1 | https://learn.microsoft.com/en-us/sql/t-sql/data-types/json-data-type | |
| vector(n) | Stores vector data for similarity search and machine learning, shown as a JSON array of floating-point numbers. The n parameter is the number of dimensions. Available in SQL Server 2025, Azure SQL Database and Azure SQL Managed Instance | 1,998 dimensions | 4 bytes per dimension | Other data types | 30 | https://learn.microsoft.com/en-us/sql/t-sql/data-types/vector-data-type |
| hierarchyid | Variable length system data type that represents a position in a tree hierarchy | 892 bytes | Other data types | https://learn.microsoft.com/en-us/sql/t-sql/data-types/hierarchyid-data-type-method-reference | ||
| geography | Stores ellipsoidal (round-earth) spatial data, such as GPS latitude and longitude coordinates | Other data types | https://learn.microsoft.com/en-us/sql/t-sql/spatial-geography/spatial-types-geography-transact-sql | |||
| geometry | Stores planar spatial data in a Euclidean (flat) coordinate system | Other data types | https://learn.microsoft.com/en-us/sql/t-sql/spatial-geometry/spatial-types-geometry-transact-sql | |||
Free sample files (up to 10 rows): CSV JSON XML
Open the sample in a free tool: CSV to JSON · JSON formatter · SQL INSERT generator · CSV to XML
CSV / JSON / XML
Put this data to work.
All 40 records, in your choice of format.
The free sample stops at 10 rows. A Data Pass removes the limit here and across the site, so you can stop collecting data and start using it.
- Every record in 402 datasets, this one included
- All 33 collections in full: more than 4 million rows of ZIP codes, schools, occupations and more
- CSV, JSON and XML, whole-category ZIPs, and 2,500 API requests a day
$69 once, for 365 days. No subscription and no automatic renewal, and what you download is yours to keep using.
Your key arrives by email after payment. Use it here to download the complete file.
Or share what you build with it and, if approved, get 75% off a Data Pass. See the contributor program
Already have a pass?
Your key is used for this request and is not saved by this page.
Commercial use is allowed, free or paid.
Downloaded a CSV? Convert CSV to JSON, generate SQL inserts, remove duplicate lines, or sort a list with the free tools.
Scope and sources
Last checked against sources: October 15, 2026.
Last changed: November 16, 2026. This is when we last changed the data or its description. It doesn’t mean the data runs up to that date.
- w3schools.com
- Microsoft Learn: Data types (Transact-SQL)
- Microsoft Learn: Data type precedence (Transact-SQL)
- Microsoft Learn: char and varchar; nchar and nvarchar (for the fixes)
- Microsoft Learn: JSON data type (size limit up to 2 GB)
- Microsoft Learn: Vector data type (float32 elements of 4 bytes, up to 1,998 dime
- Microsoft Learn: hierarchyid data type method reference (encoding limited to 892
- Microsoft Learn: Spatial types, geography and geometry
SQL Server Data Types has 40 records and 7 fields: Data type, Description, Max size, Storage, Category, Precedence, Docs url.
A complete download includes all 40 records currently held in this dataset. Check the description and sources to decide whether its scope fits your project.
Use this dataset through the API
GET https://mysafeinfo.com/api/data/sqlserverdatatypes
Choose a format, sort, or request fewer rows. A pass key gives access to the complete dataset. See the examples and parameters.
Without a pass, sorting and randomization apply only to the fixed 10-row sample.