Data Types
SmallMoney
Money data type to the 4th precision. Uses 4 bytes of space. Values -214,748.3648 to +214,748.3647
MONEY
Money data type to the 4th precision.Uses 8 bytes of space. Values -922,337,203,685,477.5808 to +922,337,203,685,477.5807
Char
Non Unicode fixed length character type
Varchar
Non Unicode variable length character type
Decimal
Number with decimal precision and whole number scale. precision p, scale s. Example: decimal(5,2) is a number that has 3 (p-s) digits before the decimal and 2 digits after the decimal. Precision: 1 - 9 Size: 5 Bytes Precision: 10 - 19 Size: 9 Bytes Precision: 20 - 28 Size: 13 Bytes Precision: 29 - 38 Size: 17 Bytes
TinyInt
Whole numeric type, uses 1 byte. Is not strict. Accepts values between 0 and 255.
SmallInt
Whole numeric type, uses 2 bytes. Is not strict. Accepts values between -32,768 and 32,768.
Int
Whole numeric type, uses 4 bytes. Is not strict. Accepts values between -2147483648 and 2147483648.
Big int
Whole numeric type, uses 8 bytes. Is not strict. Accepts values between -9223372036854775808 and 9223372036854775808. bigint is intended for use when integer values will exceed the int data type's range of support. Functions return bigint only if the original expression is a bigint data type. Note that SQL Server will not automatically promote other integer data types (i.e., tinyint, smallint, and int) to bigint.
Binary
Fixed-length binary data type. Storage usage is based on the specified size of the data with a max of 8000 bytes
Bit
A true / false or Boolean field. If there are 8 or less bit columns in a table, the columns are stored as 1 byte. If there are from 9 up to 16 bit columns, the columns are stored as 2 bytes, and so on. It can take a value of 1, 0, or NULL.
SmallDateTime
Date time value that is precise within a minute. Uses 4 bytes of storage. Can store dates between 1900-01-01 00:00:00 and 2079-06-06 23:59:00
DateTime
Date time value that is precise within a thousandth of a second. Uses 8 bytes of storage. Can store dates between 1753-01-01 00:00:00 to 9999-12-31 23:59:59.997
Date
Dates only, no time. Uses 3 bytes. Accurate to 1 day, can store dates between 0001-01-01 to 9999-12-31
Numeric
Exactly the same as Decimal
XML
Stores XML data. Maximum storage size is 2 GB
UNIQUEIDENTIFIER
Stores a globally unique identifier (GUID) It can be initialized by using NEWID() function or by converting from a string constant in the form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, in which each x is a hexadecimal digit in the range 0-9 or a-f. For example, 6F9619FF-8B86-D011-B42D-00C04FC964FF is a valid UniqueIdentifier value.
Float
This is a floating point numeric value. Uses 4 or 8 bytes. This is not as accurate as a defined numeric, but is convenient for variable precision values.
Time
Time only, to dates. Uses between 3 and 5 bytes based on the value. Accurate to 100 nanoseconds. Can store values between 00:00:00 to 23:59:59.9999999
Nchar
Unicode fixed length character type
Nvarchar
Unicode variable length character type
VarBinary
Variable Length Binary Data Type. 1<=n<=8000. Can store Maximum of 8000 bytes of data. Default Value of n: 1 The storage size is the actual length of the data entered + 2 bytes.
VarBinary(max)
Variable Length Binary Data Type. It can store Maximium 2GB of data. The storage size is the actual length of the data entered + 2 bytes. This is the advisable type for storing images in SQL Server.