When you specify values for only some of the columns in a row, one of four things can happen to the columns with no values:
If a default value exists for the column or user-defined datatype of the column, it is entered. See Chapter 13, “Defining Defaults and Rules for Data,” or create default in the Reference Manual for details.
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 also create table in the Reference Manual.
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, Adaptive Server rejects the row and displays an error message.
Table 7-4 shows what you would see under these circumstances:
You can 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.
Copyright © 2005. Sybase Inc. All rights reserved. |