Databases Reference
In-Depth Information
Table 8-2: Data Types (continued)
Group
Type name
Range
Storage
Comments
Up to 2 31
Varchar(max)
Non-unicode
characters
1
See ''Large Value Data
Types.''
bytes
text
Non-unicode
characters
16-byte
pointer is
stored in the
row. Up to
2 31
See ''Large Value Data
Types.''
1bytes.
Unicode
Character
Nchar( n )
Unicode
characters
(2
×
n ) bytes
Fixed length. Always
occupies (2 x n )bytes,
even if some bytes are
unused. Valid values for n
range from 1
4000.
Nvarchar( n )
Unicode
characters
2bytesfor
each stored
character.
Variable length. Valid
values for n range from
1
4000. 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 string's
end. See ''Row Overflow
Considerations.''
Up to 2 31
Nvarchar(max)
Unicode
characters
1
The storage size, in bytes,
is 2 times the number of
characters saved. Unused
bytes do not occupy
storage space. However, 2
additional bytes are
added. These are used as
an offset indicating the
location of the string's
end. See ''Large Value
Data Types.''
bytes.
2bytesfor
each stored
character.
ntext
Unicode
characters
16-byte
pointer is
stored in the
row. Up to
2 30
Storage size is 2 times the
characters saved. See
''Large Value Data
Types.''
1bytes.
Continued
Search WWH ::




Custom Search