SAND CDBMS SQL Reference Guide
SAND CDBMS SQL Database Objects and Language Elements

 

Previous Topic:
Views
Chapter Index
Next Topic:
Dependencies Among Database Objects

 

Constraints


A constraint is a restriction on the possible values that can be inserted into or updated in a column or table. Constraints are used to maintain the data integrity of the database by ensuring the consistency and correctness of its stored data. SAND CDBMS supports the following constraints, enforced on one or more columns in a database table:

Constraints are defined when a table is created through a CREATE TABLE statement, or when the table structure is modified by an ALTER TABLE statement. Constraints can be discarded from a table by using the ALTER TABLE...DROP CONSTRAINT command.

Constraints are named like any other database object. User-specified constraint names, however, are optional. If the constraint is not given a name by the user when it is created, SAND CDBMS automatically generates a unique name for the constraint. It is recommended that users provide meaningful names for their constraints, as this will result in greater intelligibility of error messages issued when constraints are violated, and will make it easier to drop constraints (since this can only be done by specifying the constraint name).

Consult Other Topics: Constraints for further details about column and table constraints.