Oracle Integrity Constraints
Overview
Oracle Integrity constraints are set to Oracle database tables and columns. There are several constraints that we can apply to set conditions or to limit the range of values ​​for database objects.
Types of constraints
Some of the constraints are as follows:
- NOT NULL
- UNIQUE
- PRIMARY KEY
- FOREIGN KEY
- CHECK
- ON DELETE CASCADE
NOT NULL
NOT NULL constraint – The database table column must always be filled with a value.
UNIQUE
UNIQUE constraint – The database table column or combination of columns should be is unique.
PRIMARY KEY
PRIMARY KEY constraint – To indicate that the database table column or combination of columns is the primary key for the table.
FOREIGN KEY
FOREIGN KEY constraint – database table column or column combination must exist as a key in a separate database table.
CHECK
CHECK constraint – Boolean expression is true
ON DELETE CASCADE
ON DELETE CASCADE constraint – Deleting a data row leads to the cascading deletion of the data rows in another database table connected via the FOREIGN KEY constraint.
—
Oracle Database Tutorials on this website:
https://www.testingdocs.com/oracle-database-tutorials-for-beginners/
More information about Oracle Database: