Oracle Constraints
Oracle constraints are means in the process of defining some conditions about the database that must remain true while inputting/modifying/deleting data in the database. The basic structure of an Oracle constraint is defined as: The CONSTRAINT keyword is followed by a unique constraint name and then the constraint definition. The constraint name is used to manipulate the constraint once the table has been created. In Oracle, constraints can be defined at the column or table level. An example of defining constraints at table level may be: CREATE TABLE STUDENT ( STUDENT _ID NUMBER(3) CONSTRAINT S_ID CHECK (STUDENT _ID > 0), STUDENT _NAME CHAR(30) CONSTRAINT S_NAME NOT NULL, MARKS_COUNT NUMBER(6), CONSTRAINT STUDENT _PRIME PRIMARY KEY (STUDENT _ID)) Column level constraints go directly after the column definition to which they refer and the table level constraints go after the last column definition. CREATE TABLE CLASS ( ROOM NUMBER(10) CONSTRAINT ID CHECK (ID BET