Defaults and Nulls

If a column does not allow nulls, and you do not create a default for the column, when a user attempts to insert a row but does not include a value for that column, the insert fails and the SAP ASE server generates an error message.

This table shows the relationship between the existence of a default and the definition of a column as NULL or NOT NULL.

Column Null Type

No Entry, no Default

No Entry, Default Exists

Entry is Null, no Default

Entry isNull, Default Exists

NULL

Null inserted

Default value inserted

Null inserted

Null inserted

NOT NULL

Error, command fails

Default value inserted

Error, command fails

Error, command fails