2.2.4.2.1.3 Variable Length Tokens(xx10xxxx)

This class of token definition is followed by a length specification. The length (in bytes) of this length is included in the token itself as a Length value (see section 2.2.7.3 for information about the Length rule of the COLINFO token stream).

There are two data types that are of variable length. These are real variable length data types like char and binary and nullable data types, which are either their normal fixed length corresponding to their type_info, or a special length if null.

Char and binary data types have values that are either null or 0 to 65534 (0x0000 to 0xFFFE) bytes in length.  Null is represented by a length of 65535 (0xFFFF). A char or binary, which cannot be null, can still have a length of zero (for example an empty value). A program that MUST pad a value to a fixed length will typically add blanks to the end of a char and binary zeros to the end of a binary.

Text and image data types have values that are either null, or 0 to 2 gigabytes (0x00000000 to 0x7FFFFFFF bytes) in length.  Null is represented by a length of -1 (0xFFFFFFFF). No other length specification is supported.

Other nullable data types have a length of 0 if they are null.

Show: