Nulls Require Variable-Length Datatypes

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

This table lists the fixed-length datatypes and the variable-length datatypes to which SAP ASE 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

unichar

univarchar

binary

varbinary

datetime

datetimn

float

floatn

bigint, int, smallint, tinyint,

intn

unsigned bigint, unsigned int, and unsigned smallint

uintn

decimal

decimaln

numeric

numericn

money and smallmoney

moneyn

Data entered into char, nchar, unichar, 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.