Datatypes in SQL Server 2008

The list seems to grow with every new release of SQL Server.

bit Integer storing 1, 0, “True”, “False”, or NULL.
tibyint 1 byte storing 0 to 255.
smallint 2 bytes storing
int 4 bytes storing
bigint 8 bytes storing
decimal Defined with precision up to 38 digits using format decimal.17 bytes when used at maximum precision. Default precision is 18.
numeric Functionally equivalent to decimal.
smallmoney 4-vytes scaled integer.
money 8-byte scaled integer.
real 4-byte floating point value.
float Defined using format of float. 7 digits precision and 4 bytes size.
smalldatetime 4 bytes storing date and time value from Jan 1, 1900 to June 6, 2079.
datetime 8 bytes storing date and time value with accuracy to milliseconds.
datetime2 8 bytes (default) storing value with accuracy nanoseconds.
date 3 bytes storing the date.
time 5 bytes storing time of day with accuracy of 100 nanoseconds.
datetimeoffset Equivalent to dateime2 with the addition of time zone awareness.
char Character strings fixed storage of ANSI characters.
varchar Variable storage of ANSI character.
text Variable storage of ANSI characters using 1 byte per character.
nchar Fixed storage of Unicode characters using 2 byte.
nvarchar Variable storage of Unicode.
ntext Unicode character strings. This data type will not be supported in future releases.
binary Binary strings
varbinary Binary strings
image Binary Strings. This data type will not be supported in future releases.
cursor Type used to store a reference to a cursor in a variable or output parameter of a stored procedure.
rowversion Reflects the functionality of the former timestamp datatype.
hierarchyid A variable system datatype that represents position is a hierarchy.
uniqueidentifier a 16-byte GUID value.
sql_variant Can store a value of any datatype except:varchar (max)nvarchar (max)varbinary (max)xmltextntextimagerowversionsql_variant
xml Variable type storing up to 2 GB data in well-formed XML doc.
table Variable type storing a table in a declared variable or stored procedure output parameter.

2 thoughts on “Datatypes in SQL Server 2008

Add yours

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at

Up ↑

%d bloggers like this: