Showing posts with label On Delete Cascade. Show all posts
Showing posts with label On Delete Cascade. Show all posts

Friday, January 12, 2024

SQL Constraints | NOTNULL | UNIQUE | PRIMARY KEY | FOREIGN KEY | On Delete Cascade | CHECK | Basics of Oracle SQL | Oracle SQL | SQL

 Constraints
What are Constraints?
Constraints enforce rules at the table level.
Constraints prevent the deletion of a table if there are dependencies.
The following constraint types are valid:
      Constraint                                Description
     NOT NULL             :     Specifies that the column cannot contain a null value.

     UNIQUE                 :     Specifies a column or combination of columns whose values must be unique
                                           for  all rows in the table.

     PRIMARY KEY        :     Uniquely identifies each row of the table.

     FOREIGN KEY         :     Establishes and enforces a foreign key relationship between  the column and
                                            a column of the referenced table..

     CHECK                     :     Specifies a condition that must be true.