Joins

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Joins:

Retrieving data from multiple tables are called as joins. Types of joins: 1) 2) 3) 4) 5) Equi joins Non Equi Joins Self Joins Outer Joins (Left/Right Outer Joins) Cross Joins

1) Equi Join/Inner Join/Simple Join:


If the data is retrieved from multiple tables based on the columns having some common data is called as the equi joins.

2) Non Equi Join:


If the data is retrieved from multiple tables based on the columns which does not contains any common data are called as the Non Equi Joins.

3) Outer Joins:
A join between 2 tables that returns the results of an inner join as well as unmatched rows of a table is a Outer Join. a) Left Outer Join: A join between 2 tables that returns the results of an inner join as well as unmatched rows of a Left Table is a Left Outer Join. b) Right Outer Join: A join between 2 tables that returns the results of an inner join as well as unmatched rows of a Right Table is a Right Outer Join. c) Full Outer Join: A join between 2 tables that returns the results of an inner join as well as the results of a left and right join is a Full Outer Join.

4) Self Join:
Join a table to itself by using a Self Join.

5) Cross Join:
All rows in the first table are joined to all rows in the second table.

Natural Join:
If table1 is naturally joins with table2, then automatically Oracle checks for the columns which have the same names and datatypes based on the columns then automatically it applies an Equi Join.

Using Clause:
It is used to join the data between 2 tables based on the common columns automatically it applies an Equi Join.

On Clause:
It is used to join the data between 2 tables based on the user define condition automatically it applies an Equi Join.

You might also like