Datasheet

Data Type Size in
Name Class Bytes Nature of the Data
DateTime Date/Time 8 Date and time data from January 1, 1753, to
December 31, 9999, with an accuracy of three-
hundredths of a second.
SmallDate Date/Time 4 Date and time data from January 1, 1900, to
Time June 6, 2079, with an accuracy of one minute.
Cursor Special 1 Pointer to a cursor. While the pointer takes up
Numeric only a byte, keep in mind that the result set
that makes up the actual cursor also takes up
memory exactly how much will vary depend-
ing on the result set.
Timestamp/ Special 8 Special value that is unique within a given
rowversion Numeric database. Value is set by the database itself
(binary) automatically every time the record is inserted or
updated, even though the timestamp column
wasn’t referred to by the
UPDATE statement.
(You’re actually not allowed to update the time-
stamp field directly.)
Unique Special 16 Special Globally Unique Identifier (GUID). Is
Identifier Numeric guaranteed to be unique across space and time.
(binary)
Char Character Varies Fixed-length character data. Values shorter than
the set length are padded with spaces to the set
length. Data is non-Unicode. Maximum specified
length is 8,000 characters.
VarChar Character Varies Variable-length character data. Values are
not padded with spaces. Data is non-Unicode.
Maximum specified length is 8,000 characters,
but you can use the
max keyword to indicate it as
essentially a very large character field (up to 2^31
bytes of data).
Text Character Varies Legacy support as of SQL Server 2005. Use
varchar(max) instead.
NChar Unicode Varies Fixed-length Unicode character data. Values
shorter than the set length are padded with spaces.
Maximum specified length is 4,000 characters.
NVarChar Unicode Varies Variable-length Unicode character data. Values
aren’t padded. Maximum specified length is 4,000
characters, but you can use the
max keyword to
indicate it as essentially a very large character
field (up to 2^31 bytes of data).
12
Chapter 1
04_584340 ch01.qxp 10/18/06 2:11 PM Page 12