You can specify values for only some of the columns in a row. Certain rules will apply when adding rows without values for all columns.
If a default value exists for the column or user-defined datatype of the column, it is entered.
If NULL was specified for the column when the table was created and no default value exists for the column or datatype, NULL is entered. See insert in the Reference Manual: Commands.
If the column has the IDENTITY property, a unique, sequential value is entered.
If NULL was not specified for the column when the table was created and no default exists, SAP ASE rejects the row and displays an error message.
Default Exists for Column or Datatype |
Column Defined NOT NULL |
Column Defined to Allow NULL |
Column is IDENTITY |
---|---|---|---|
Yes |
The default |
The default |
Next sequential value |
No |
Error message |
NULL |
Next sequential value |
Use sp_help to display a report on a specified table or default, or on any other object listed in the system table sysobjects. To see the definition of a default, use sp_helptext.