Dtatype | Range | Used to store |
int |
-2^31 (-2,147,483,648) to & 2^31 - 1 (2,147,483,647) |
Integer data (whole numbers) |
smallint |
-2^15 (-32,768) to 2^15 - 1 (32,767) |
Integer data |
tinyint | 0 to 255 | Integer data |
bigint | -2^63 (-9,223,372,036,854,775,808) to 2^63-1 (9,223,372,036,854,775,807) | Integer data |
float | -1.79E + 308 to 1.79E + 308 | Floatin precision data |
money | -2^63 (-922,337,203,685,477.5808) to 2^63 - 1 (+922,337,203,685,477.5807) | Monetary data |
smallmoney | -214,748.3648 to +214,748.3647 | Monetary data |
datatime | January 1, 1753, to December 31, 9999 | Date and time data |
smalldatatime | January 1, 1900, to June 6, 2079 | Date and time data |
char(n) | n characters, where n can be 1 to 8000 | Fixed length character data |
varchar(n) | n characters, where n can be 1 to 8000 | Variable length character data |
text | Maximum length of 2^31 - 1 (2,147,483,647) characters | Character string |
ntext | Maximum length of 2^30 - 1 (1,073,741,823) characters | Variable length Unicode data |
bit | 1 or 0 value | Integer data with 0 or 1 |
image | Maximum length of 2^31 - 1 (2,147,483,647) bytes | Variable length binary data to store images |
real | -3.40E + 38 to -1.18E - 38 | Floating precision number |
binary | Maximum length of 8,000 bytes | Fixed length binary data |
varbinary | Maximum length of 8,000 bytes | Variable length binary data |
nchar | Maximum length of 4,000 characters | Fixed length Unicode data |
nvarchar | Maximum length of 4,000 characters | Variable length Unicode data |
sql_varient | Maximum storage size of8016 bytes | Contain rows of different datatypes except text, ntext, image, timestamp and sql_variant |
timestamp | Maximum storage size of 8 bytes | unique number in a database that get updated every time a row that contains it is inserted or updated |