Automatic conversion of fixed-length NULL columns

Only columns with variable-length datatypes can store null values. When you create a NULL column with a fixed-length datatype, Adaptive Server automatically converts it to the corresponding variable-length datatype. Adaptive Server does not inform the user of the datatype change.

Table 1-4 lists the fixed- and variable-length datatypes to which they are converted. Certain variable-length datatypes, such as moneyn, are reserved datatypes; you cannot use them to create columns, variables, or parameters:

Table 1-4: Automatic conversion of fixed-length datatypes

Original fixed-length datatype

Converted to

char

varchar

unichar

univarchar

nchar

nvarchar

binary

varbinary

datetime

datetimn

float

floatn

int, smallint, and tinyint

intn

decimal

decimaln

numeric

numericn

money and smallmoney

moneyn