0% found this document useful (0 votes)
73 views4 pages

Joins:: 1) Equi Join/Inner Join/Simple Join

This document defines and describes different types of joins in SQL. It explains equi joins, non-equi joins, self joins, outer joins including left, right and full outer joins, cross joins, natural joins, and using and on clauses for joins. The key types of joins covered are inner joins, which return rows with matching column values, outer joins which also return non-matching rows, and cross joins which do a cartesian product joining every row from one table with every row of another.

Uploaded by

Srinivas Neelam
Copyright
© © All Rights Reserved
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)
73 views4 pages

Joins:: 1) Equi Join/Inner Join/Simple Join

This document defines and describes different types of joins in SQL. It explains equi joins, non-equi joins, self joins, outer joins including left, right and full outer joins, cross joins, natural joins, and using and on clauses for joins. The key types of joins covered are inner joins, which return rows with matching column values, outer joins which also return non-matching rows, and cross joins which do a cartesian product joining every row from one table with every row of another.

Uploaded by

Srinivas Neelam
Copyright
© © All Rights Reserved
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/ 4

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 are called as 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.
Ex: select ename,dname from emp cross join dept;
Emp -----> 14 records
Dept -----> 4 records
Total records----->14*4=56 records.

Natural Join:
If table1 is naturally joins with table2, then automatically Oracle checks for
the columns which have the same names and data types 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 defined
condition automatically it applies an Equi Join.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy