Understand Different Type Of Joins In SQL

_______________________

By:  HIMANSHU GAHLAWAT

Joins are query in SQL which are used to join two or more tables and get desired data

_______________________

What are Joins ?

thedataanalyst.in

Used to return records that have matching values in both tables

_______________________

1 - INNER JOIN

thedataanalyst.in

Get all records from the left table and matching records from the right table

_______________________

2 - LEFT JOIN

thedataanalyst.in

Get all records from the right table and matching records from the left table

_______________________

3 - RIGHT JOIN

thedataanalyst.in

Returns all records when there is a match in either the left or right table

_______________________

4 - FULL JOIN

thedataanalyst.in

Produces a Cartesian product of the two tables, combining all rows from both

_______________________

5 - CROSS JOIN

thedataanalyst.in