Only columns with variable-length datatypes can store null values. When you create a NULL column with a fixed-length datatype, Adaptive Server converts it to the corresponding variable-length datatype. Adaptive Server does not inform you of the type change.
Table 8-2 lists the fixed-length datatypes and the variable-length datatypes to which Adaptive Server converts them. Certain variable-length datatypes, such as moneyn, are reserved; you cannot use them to create columns, variables, or parameters.
Original Fixed-Length Datatype |
Converted To |
---|---|
char |
varchar |
nchar |
nvarchar |
binary |
|
datetime |
datetimn |
float |
floatn |
int, smallint, and tinyint |
intn |
decimal |
decimaln |
numeric |
numericn |
money and smallmoney |
moneyn |
Data entered into char, nchar, and binary columns follows the rules for variable-length columns, rather than being padded with spaces or zeros to the full length of the column specification.