Oracle Constraints
Wednesday, February 14th, 2007Constraints are used to keep accurate data. In oracle you can apply these policies to a column or table. There are five different types of constraints:
| Constraint | Abbreviation | Description |
| PRIMARY KEY | _pk | This is a unique field that is not allowed to have null values. |
| FOREIGN KEY | _fk | This constraint is placed in the “many” table. The data that’s entered in this field must have a value in the parent table. |
| UNIQUE | _uk | All data that is stored in a column with a UNIQUE constraint on it will not have two of the same values. This constraint is a bit different from a PRIMARY KEY where the PRIMARY KEY does not allow NULLs, a UNIQUE constraint does allow NULLs. |
| CHECK | _ck | This constraint ensures that a specified condition is true before any data is added to the table. |
| NOT NULL | _nn | This makes sure that there is a value going into the table. |
L = the lower end of the category that contains the middle person. The middle person will be 18.5.