Unique
UNIQUE(Integrity Constraint)
The purpose of a unique key is to ensure that information in the columns is unique i.e. a value entered in column defined in the unique constraint must not be repeated across the column. A table may have many unique keys.
Syntax:- 1.Columnname datatype(size) Unique à Column level
2. Unique (columname,colname,----) à Table level
Ex:- 1 create table vision2(eno number(5) unique,na varchar2(20),sal number(5));
2 Create table vision3(eno number(5),code number(5),sal number(5),
unique (eno,code));
3 insert into vision2 values(100,’prasad’,3200);
4 insert into vision2 values(100,’vani’,4300);
5 insert into vision3 values(100,10,1000);
6 insert into vision3 values(200,10,2000);
7 insert into vision3 values(200,10,3200);
For
Online Classes
Contact Us: +919885348743
Online Classes
Contact Us: +919885348743