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:
Original fixed-length datatype |
Converted to |
---|---|
char |
varchar |
unichar |
univarchar |
nchar |
nvarchar |
binary |
varbinary |
datetime |
datetimn |
date |
daten |
time |
timen |
float |
floatn |
bigint, int, smallint, and tinyint |
intn |
unsigned bigint, unsigned int, and unsigned smallint |
uintn |
decimal |
decimaln |
numeric |
numericn |
money and smallmoney |
moneyn |