Sunday, 20 November 2011


Cross Join - The Cross Join is join condition involving Cartasian Product. A product results is not use where multitable query condition is use.

We have following "Emp_Table" name table:          We have following "Dept_Table" name table:

NameDept_ID
John21
Jay487
Bhavesh23
Jaimin24
Dolar24
AjayNULL


Dept_IDDept_Name
21Sales
23Engineering
24Clerical
25Marketing


Cross Join Example

Syntax:
SELECT Table_Name1.Column_Name,Table_Name2.Column_Name 
FROM Table_Name1,Table_Name2;
Example Statement:
SQL> SELECT * 
FROM Emp_Table,Dept_Table;
Example Result:

Emp.Table.NameEmp_Table.Dept_IDDept_Table.Dept_NameDept_Table.Dept_ID
John21Sales21
Jay23Sales21
Jaimin23Sales21
Dolar24Sales21
Ajay24Sales21
BhaveshNULLSales21
John21Engineering21
Jay23Engineering23
Jaimin23Engineering23
Dolar24Engineering23
Ajay24Engineering23
BhaveshNULLEngineering23
John21Clerical35
Jay23Clerical35
Jaimin23Clerical35
Dolar24Clerical35
Ajay24Clerical35
BhaveshNULLClerical35
John21Marketing35
Jay23Marketing35
Jaimin23Marketing35
Dolar24Marketing35
Ajay24Marketing35
BhaveshNULLMarketing35

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