Knowledge
JOIN
SQL operation that allows to link two different sources of data. Most common joins are INNER (1 to 1) are LEFT OUTER (1 to Many)
Materials
- Join_(SQL)An 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.
Check yourself
Q:
What is the right type of join when you want to have all possible combinations of rows from two tables?
Q:
What happens during INNER join when right table contains two matching records (A and B) for some row (X) in left table?
Do you know that ...?
- Cross join - all combinations of rows in left table and right table
If left table contains N rows and right table contains M rows, cross join will result in N*M rows
- Left join get all rows from main (left) table, and whatever matched from right table
If no match found in the right table, the coresponding columns will contain NULL
Skillsets


Skyeng PostgreSQL DBA
by Artem Naumenko (slack2)

PHP Developer Roadmap
by goncalves.helder






