Enabling a Constraint
You can enable an existing constraint using the ENABLE CONSTRAINT
clause of ALTER TABLE
.
ALTER TABLE employee
ENABLE CONSTRAINT your_constraint_name;
To enable a constraint, all the rows in the table must satisfy the constraint.
You can apply a constraint to new data only by specifying ENABLE NOVALIDATE
:
ALTER TABLE employee
ENABLE NOVALIDATE CONSTRAINT your_constraint_name;
The default is ENABLE VALIDATE
, which means existing rows must pass the constraint check.
Home »
Oracle »
Table »
Oracle »
Table »
Constraints:
- Adding a Constraint with CHECK
- Adding a NOT NULL Constraint
- Adding a FOREIGN KEY Constraint
- ON DELETE CASCADE
- ON DELETE SET NULL
- Adding a UNIQUE Constraint
- CHECK constraint
- Multiple Constraints
- Dropping a Constraint
- Disabling a Constraint
- Enabling a Constraint
- Deferred Constraints
- Getting Information on Constraints:user_constraints and all_constraints
Related: