0% found this document useful (0 votes)
67 views2 pages

Joins

There are several types of joins for retrieving data from multiple database tables: equi joins retrieve data based on common columns between tables, non-equi joins retrieve data based on non-common columns, outer joins return data from both matched and unmatched rows between tables, self joins match a table to itself, and cross joins combine every row of one table with every row of another table. Natural joins automatically perform equi joins based on matching column names and data types, while using and on clauses allow users to specify equi join conditions.

Uploaded by

Srinivas Neelam
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views2 pages

Joins

There are several types of joins for retrieving data from multiple database tables: equi joins retrieve data based on common columns between tables, non-equi joins retrieve data based on non-common columns, outer joins return data from both matched and unmatched rows between tables, self joins match a table to itself, and cross joins combine every row of one table with every row of another table. Natural joins automatically perform equi joins based on matching column names and data types, while using and on clauses allow users to specify equi join conditions.

Uploaded by

Srinivas Neelam
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 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