Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 18

INTEGRITY CONSTRAINTS

INTEGRITY CONSTRAINTS
INTEGRITY CONSTRAINTS
Syntax
INTEGRITY CONSTRAINTS
SQL> CREATE table student (sno number(3),
sname varchar2(20) constraint std_sname_u unique,
smarks number(3))
INTEGRITY CONSTRAINTS
CONSTRAINTS At Column & Table Level:
INTEGRITY CONSTRAINTS
CONSTRAINTS At Column & Table Level:
SQL> CREATE table student (sno number(3) not null,
sname varchar2(20) constraint std_sname_u unique,
smarks number(3), sage number(3) check(sage<120),
constraint std_smarks_c check(smarks<=600 ));
INTEGRITY CONSTRAINTS
UNIQUE CONSTRAINT
INTEGRITY CONSTRAINTS
PRIMARY KEY CONSTRAINT
INTEGRITY CONSTRAINTS
FOREIGN KEY CONSTRAINT
INTEGRITY CONSTRAINTS
FOREIGN KEY CONSTRAINT
INTEGRITY CONSTRAINTS
ADD A CONSTRAINT
INTEGRITY CONSTRAINTS
DROPING A CONSTRAINT
INTEGRITY CONSTRAINTS
DISABLING A CONSTRAINT
INTEGRITY CONSTRAINTS
ENABLING A CONSTRAINT
INTEGRITY CONSTRAINTS
CASCADING CONSTRAINTS
INTEGRITY CONSTRAINTS
CASCADING CONSTRAINTS
INTEGRITY CONSTRAINTS
VIEWING CONSTRAINTS
INTEGRITY CONSTRAINTS
VIEWING COLUMNS ASSOCIATED WITH CONSTRAINTS

You might also like