top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

Oracle: What is a CONSTRAINT? What are its various levels?

+1 vote
34 views
Oracle: What is a CONSTRAINT? What are its various levels?
posted Aug 20, 2015 by Viswas Kumar

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

1 Answer

+1 vote
 
Best answer

CONSTRAINTS are used to check validations before inserting data into Table and also provide relationship between tables.
TABLE LEVEL CONSTRAINTS : 1. UNIQUE CONSTRAINT
2. PRIMARY KEY CONSTRAINT
3. CHECK CONSTRAINT
4. FOREIGN KEY CONSTRAINT
COLUMNLEVEL CONSTRAINTS : 1. UNIQUE CONSTRAINT
2. PRIMARY KEY CONSTRAINT
3. CHECK CONSTRAINT
4. FOREIGN KEY CONSTRAINT
5. NOT NULL CONSTRAINT
6. DEFAULT CONSTRAINT.

NOT NULL Constraint - Disallows NULL values in a table's column.
UNIQUE Constraint - Disallows duplicate values in a column or set of columns.
PRIMARY KEY Constraint - Disallows duplicate values and NULL values in a column or set
of columns.
FOREIGN KEY Constraint - Require each value in a column or set of columns match a
value in a related table's UNIQUE or PRIMARY KEY.
CHECK Constraint - Disallows values that do not satisfy the logical expression of
the constraint.

answer Aug 21, 2015 by Arun Gowda
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...