Home Sql SQL UNIQUE Constraint
Questions:Ask|Latest


 
 

Share on Google+Share on Google+

SQL UNIQUE Constraint

Advertisement
The UNIQUE constraint uniquely identifies each record in a database table.

SQL UNIQUE Constraint

     

The UNIQUE constraint uniquely identifies each record in a database table.

 

 

 

 

 

Create Table Stu_Class_10

create table Stu_Class_10(
Stu_Id integer(2) NOT NULL,
Stu_Name varchar(15),
Stu_Class  varchar(10),
UNIQUE (id))

Insert data into Stu_Class_10

insert into Stu_Class_10 values(1,'Komal',10);
insert into Stu_Class_10 values(2,'Ajay',10);
insert into Stu_Class_10 values(3,'Rakesh',10);
insert into Stu_Class_10 values(4,'Bhanu',10);
insert into Stu_Class_10 values(5,'Santosh',10);

Stu_Class_10

Stu_Id Stu_Name Stu_Class
1 Komal 10
2 Ajay 10
3 Rakesh 10
4 Bhanu 10
5 Santosh 10
Advertisement

Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: December 20, 2008

Ask Questions?    Discuss: SQL UNIQUE Constraint  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments
DMCA.com