June 2018
Intermediate to advanced
478 pages
10h 52m
English
The DEFAULT constraint allows you to specify a predefined value that is written to a column if the application doesn't supply a value. The predefined value provided can be NULL (if the NOT NULL constraint has not been defined for the column), a user, or an application-supplied value with a compatible data type or a value provided by the Db2 database manager. The default constraints are only applied to new rows inserted into the table via INSERT, IMPORT, LOAD or INGEST commands. For existing records, the Db2 database manager will furnish a default value as shown in the following table:
|
Column data type |
Default value provided |
|
SMALLINT, INTEGER, DECIMAL, NUMERIC, NUM, REAL, FLOAT, DOUBLE, DOUBLE RECISION |
0 |
Read now
Unlock full access