0% found this document useful (0 votes)
2 views3 pages

SQL JOIN Types Explained

Uploaded by

JEEL JAYESH SHAH
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)
2 views3 pages

SQL JOIN Types Explained

Uploaded by

JEEL JAYESH SHAH
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

Join

A JOIN clause is used to combine rows from two or more tables, based on
a related column between them.

 INNER JOIN

Returns based on only matching rows b/w two tables

Syntax:

We can also select columns from both the tables.

 LEFT JOIN

The LEFT JOIN keyword returns all records from the left table (table1), and
the matching records from the right table (table2). The result is 0 records
from the right side, if there is no match.

Syntax:

Example:
o/p:

 FULL OUTER JOIN

o Returns all rows from both tables.


o If there is no match, it fills in NULL for the missing side

Tip: FULL OUTER JOIN and FULL JOIN are the same.

Syntax

Self join:

1.
2.

Q. Write a SQL query using a self join to display pairs of books that
belong to the same series, but not the same book.

You might also like