Sunday, 20 November 2011


The SQL UNION operator combines two or more selected column. Union must be use only when Column name to be same.

We have following "Student_Detail" name table:

S_NoS_NameTotalPercentage
1Jay50777.84
2Ajay48774.92
3Bhavesh46972.15
4Jaimin46371.23
5Dolar42565.38

We have following "Stu_Detail" name table:

S_NoS_Name
6Jasmina
7Jigar
8Sweety
9Aakash
10Trupti


Union Join Example

Syntax:
SELECT Column_Name(s) FROM Table_Name1
UNION
SELECT Column_Name(s) FROM Table_Name2
Example Statement:
SQL> SELECT S_Name FROM Student_Detail
UNION
SELECT S_Name FROM Stu_Detail;
Example Result:
S_Name
Jay
Ajay
Bhavesh
Jaimin
Dolar
Jasmina
Jigar
Sweety
Aakash
Trupti


















SQL GUIDE

0 comments:

Post a Comment

TrainingHUB. Powered by Blogger.

Total Pageviews

THE BEST QTP TRAINING INSTITUTE IN HYDERABAD

QTP Training in hyderabad

Sql Tutorial

Popular Posts

Our Facebook Page

TrainingHUB

Followers