June 2018
Intermediate to advanced
478 pages
10h 52m
English
In Db2, you can use the NULL value to represent an unknown state or missing information for a column. By default, every column in a table will accept a NULL value. However, some business rules might dictate that a value must always be provided for a column. In those situations, the NOT NULL constraint can be used to ensure that a given column of a table is never assigned the NULL value. Once a NOT NULL constraint has been defined on a column or set of columns, any INSERT or UPDATE operation that attempts to insert a NULL value into that column will fail. The following diagram shows how to use the NOT NULL constraint to avoid NULL values:
The NOT NULL constraints are associated ...
Read now
Unlock full access