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

Assignment 3

Uploaded by

cedrickxxv
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)
11 views3 pages

Assignment 3

Uploaded by

cedrickxxv
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/ 3

NAME : CO, ERIC T.

SECTION: BSIS – 3A
• WHAT IS JOIN?

• SQL join clause – corresponding to a join operation in relational algebra –


combines columns from one or more tables in a relational database. It creates a
set that can be saved as a table or used as it is. A JOIN is a means for
combining columns from one (self-join) or more tables by using values common
to each. ANSI-standard SQL specifies five types of JOIN: INNER, LEFT
OUTER, RIGHT OUTER, FULL OUTER and CROSS. As a special case, a table
(base table, view, or joined table) can JOIN to itself in a self-Join.

• Explain each of the following and provide an example


• EQUI JOIN
• An equi-join is a basic join with a WHERE clause that contains a
condition specifying that the value in one column in the first table
must be equal to the value of a corresponding column in the
second table.

• RIGHT JOIN

The SQL RIGHT JOIN, joins two tables and fetches rows based on
a condition, which is matching in both the tables (before and after
the JOIN clause mentioned in the syntax below) , and the
unmatched rows will also be available from the table written after
the JOIN clause.

• LEFT JOIN

• LEFT JOIN (specified with the keywords LEFT JOIN and ON)
which the SQL-expression is true, plus rows from the first table that
do not match any row in the second table.

• OUTER JOIN
• The SQL OUTER JOIN returns all rows from both the participating
tables which satisfy the join condition along with rows which do not
satisfy the join condition. The SQL OUTER JOIN operator (+) is
used only on one side of the join condition only.

The subtypes of SQL OUTER JOIN:

• LEFT OUTER JOIN or LEFT JOIN


• RIGHT OUTER JOIN or RIGHT JOIN
• FULL OUTER JOIN

• INNER JOIN
• The INNER JOIN keyword selects all rows from both tables as long
as there is a match between the columns.

• NATURAL JOIN

A NATURAL JOIN is a JOIN operation that creates an implicit join


clause for you based on the common columns of the two tables that
are being joined. Common columns are columns that have the
same name in both the tables.

• Join the two tables using the following join.


• INNER JOIN

• RIGHT JOIN

• LEFT JOIN

• NATURAL JOIN

You might also like