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

Lecture - 27 - OUTER Join

Uploaded by

Dragan Petrovic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views4 pages

Lecture - 27 - OUTER Join

Uploaded by

Dragan Petrovic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

JOINS

JOINS are used to retrieve data from multiple tables. It is performed whenever two or more tables are joined in a SQL
statement.

• INNER JOIN (or sometimes called simple join)


• LEFT OUTER JOIN (or sometimes called LEFT JOIN)
TYPES • RIGHT OUTER JOIN (or sometimes called RIGHT JOIN)
• FULL OUTER JOIN (or sometimes called FULL JOIN)
• CROSS JOIN (or sometimes called CARTESIAN JOIN)

Start-Tech Academy
FULL OUTER JOIN
The FULL JOIN combines the results of both left and right outer joins

SELECT table1.column1, table2.column2...


FROM table1
Syntax FULL JOIN table2
ON table1.common_field = table2.common_field;

Start-Tech Academy
FULL OUTER JOIN
The FULL JOIN combines the results of both left and right outer joins

SELECT
a.order_line ,
a.product_id,
a.customer_id,
a.sales,
b.customer_name,
Example b.age,
b.customer_id
FROM sales_2015 AS a
FULL JOIN customer_20_60 AS b
ON a.customer_id = b.customer_id
ORDER BY a.customer_id , b.customer_id;

Start-Tech Academy

You might also like