List Of Data Types And Their Sizes

Facebooktwitterredditpinterestlinkedinmail

The below table shows the storage sizes of the different data types in SQL Server.

DateTime Data Types
date 3 bytes
datetime 8 bytes
datetime2 6 – 8 bytes (depending on precision)
datetimeoffset 10 bytes
smalldatetime 4 bytes
time 5 bytes
Numeric Data Types
decimal 5 – 17 bytes
numeric 5 – 17 bytes
float 4 or 8 bytes
real 4 bytes
bigint 8 bytes
int 4 bytes
smallint 2 bytes
tinyint 1 byte
money 8 bytes
smallmoney 4 bytes
String
char size defined in table
varchar 2 bytes + data size
text data size
nchar 2 times size defined in table
nvarchar 2 bytes + 2 times data size
ntext 2 times data size
Binary
binary size defined in table
varbinary 2 bytes + data size
image 2 bytes + data size
Other
bit 1 byte
hierarchyid 5 bytes
uniqueidentifier 16 bytes

Reference: http://msdn.microsoft.com/en-us/library/ff848794.aspx

1 thought on “List Of Data Types And Their Sizes”

Leave a Reply to Tim Cancel reply

CommentLuv badge