Previous |
Next |
To ensure that the data in your tables satisfies the business rules that your application models, you can use constraints, application logic, or both.
Constraints restrict the values that columns can have. Trying to change the data in a way that violates a constraint causes an error and rolls back the change. Trying to add a constraint to a populated table causes an error if existing data violates the constraint.
Tip: Wherever possible, use constraints instead of application logic. Oracle Database checks that all data obeys constraints much faster than application logic can. |
Constraints can be enabled and disabled. By default, they are created in the enabled state.
This section contains: