Scalable Database Server, HiRDB Version 8 Description

[Contents][Glossary][Index][Back][Next]

5.6.1 NOT NULL constraint

You can define the NOT NULL constraint for a column, and thereby prohibit the null value as data in the column. The NOT NULL constraint is specified on a column-by-column basis. When the NOT NULL constraint is defined for a column, a row containing the null value in that column cannot be added, nor can a row be updated so as to set the null value in that column. A column for which the NOT NULL constraint is defined must have a definite value in every row. An attempt to set the null value in such a column results in a constraint violation.

The NOT NULL constraint is set by specifying the NOT NULL option in the CREATE TABLE statement. For details about the NOT NULL constraint, see the HiRDB Version 8 UAP Development Guide.

Comment
The NOT NULL constraint is applied to columns for which the primary key is defined.