Databases Reference
In-Depth Information
Table 8-2: Data Types (continued)
Group
Type name
Range
Storage
Comments
Binary Strings
Binary( n )
String of bits
n bytes.
Fixed length. Always
occupies n bytes, even if
some bytes are unused.
Valid values for n range
from 1-8000.
Varbinary( n )
String of bits
1 byte for each
stored
character.
Variable length. Valid
values for n range from 1 -
8000. If n is omitted the
default is 1. Unused bytes
do not occupy storage
space. However, 2
additional bytes are
added. These are used as
an offset indicating the
location of the binary
string's end. See ''Row
Overflow Considerations.''
Up to 2 31 -1
bytes
Varbinary(max)
String of bits.
See ''Large Value Data
Types.''
image
String of bits.
16-byte
pointer is
stored in the
row. Up to
2 31
See ''Large Value Data
Types.''
1bytes
Misc. types
Xml
This allows
storage of
complete or
partial XML
documents
Up to 2 GB.
These documents can be
either typed or untyped.
See BOL for details about
creating a typed column.
See ''Large Value Data
Types.''
Sql_variant
See entries for
base datatypes.
???
This allows storing values
of various data types,
except text, ntext, image,
timestamp, and
sql_variant. See ''Row
Overflow Considerations.''
Sysname
Unicode
characters
2bytesfor
each stored
character.
Equivalent to
nvarchar(128)
Continued
Search WWH ::




Custom Search