Column and table constraints
Deployment options: Netezza Performance Server for Cloud Pak for Data SystemNetezza Performance Server for Cloud Pak for Data
When you create a table, you can specify constraints for a column, table, or both. For example, a
table_constraint
can
be:{ PRIMARY KEY ( column_name [, ... ] ) | FOREIGN KEY ( column_name [,
... ] ) REFERENCES reftable (refcolumn ) [ MATCH matchtype ] [ ON
DELETE action ] [ ON UPDATE action ] [ [ NOT ] DEFERRABLE ] [ INITIALLY
checktime ] } [, ...]
Note: The system permits and maintains primary key, default, foreign key, unique, and
references. Because Netezza Performance Server does not
support constraint checking and referential integrity, you must ensure your own constraint checking
and referential integrity.
If you have permission to create a table, you can specify a constraint. If you have permission to alter a table, you can add or drop a table constraint.
You cannot change constraint names or directly change the owner of the constraint. The owner of the constraint is always the owner of the table. Thus, if you change the owner of the table, the system changes the owner of all associated constraints.