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

Different types of JOINS

  • (INNER) JOIN: Select records that have matching values in both tables

108.png
 
 
  • LEFT (OUTER) JOIN:Select records from the first (left-most) table with matching right table records.

109.png
  • RIGHT (OUTER) JOIN:Select records from the second (right-most) table with matching left table records.

110.png
 
 
  • FULL (OUTER) JOIN: Selects all records that match either left or right table records.

111.png