SQL JOINS

SOURCE

In SQL, aĀ joinĀ is used to compare and combine ā€” literally join ā€” and return specific rows of data from two or more tables in a database. AnĀ inner joinĀ finds and returns matching data from tables, while anĀ outer joinĀ finds and returns matching dataĀ andĀ some dissimilar data from tables.

An inner join onĀ ProductsĀ returns information about only those products that are common in both tables or ALL Tables combined on based on the join conditions.

 

Outer Join

An outer join returns a set of records (or rows) that include what an inner join would return but also includes other rows for which no corresponding match is found in the other table.

SometimesĀ nullsĀ will be produced in this process as some data is shared while other data is not.

Full Outer Join

A full outer join, or full join, which isĀ notĀ supported by the popularĀ MySQLĀ database management system, combines and returnsĀ allĀ data from two or more tables, regardless of whether there is shared information. Think of a full join as simply duplicating all the specified information, but in one table, rather than multiple tables. Where matching data is missing, nulls will be produced.

 

 

Thanks! You've already liked this
15 comments