You are on page 1of 11

Disclaimer: This presentation is prepared by trainees of

baabtra as a part of mentoring program. This is not official


document of baabtra –Mentoring Partner
Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt .
Ltd
Joins and different types of joins in
SQL

Sarbazali.N
sarbazalin@gmail.com
Sarbaz Ali
twitter.com/username
in.linkedin.com/in/profilena
me
9037896770
What is sql join?

A SQL join clause combines records from


two or more tables in a database.
Sql joins

o INNER JOIN
o FULL OUTER JOIN
o RIGHT OUTER JOIN
o LEFT OUTER JOIN
INNER JOIN
The INNER JOIN keyword returns rows when there is
at least one match in both tables.

SYNTAX:-
SELECT column_name(s)
FROM table_name1
INNER JOIN table_name2
ON table_name1.column_name=table_name2.column_name
FULL OUTER JOIN
The FULL JOIN keyword return rows when there
is a match in one of the tables.

SYNTAX:-
SELECT column_name(s)
FROM table_name1
FULL JOIN table_name2
ON
table_name1.column_name=table_name2.colum
n_name;
RIGHT OUTER JOIN
The RIGHT JOIN keyword returns all the rows from
the right table (table_name2), even if there are no
matches in the left table (table_name1).
SYNTAX:-
SELECT column_name(s)
FROM table_name1
RIGHT JOIN table_name2
ON
table_name1.column_name=table_name2.column_n
ame
LEFT OUTER JOIN

The LEFT JOIN keyword returns all rows from the left table
(table_name1), even if there are no matches in the right table
(table_name2).

SYNTAX:-
SELECT column_name(s)
FROM table_name1
LEFT JOIN table_name2
ON table_name1.column_name=table_name2.column_name
If this presentation helped you, please visit our
page facebook.com/baabtra and like it.
Thanks in advance.
www.baabtra.com | www.massbaab.com |www.baabte.com
Contact Us

Emarald Mall (Big Bazar Building) NC Complex, Near Bus Stand


Mavoor Road, Kozhikode, Mukkam, Kozhikode,
Kerala, India. Kerala, India.
Ph: + 91 – 495 40 25 550 Ph: + 91 – 495 40 25 550

Start up Village
Eranakulam,
Kerala, India.
Email: info@baabtra.com

You might also like