1 of 10

Types of join

2 of 10

Types of join

  • Cross join
  • Natural join
  • Inner join
  • Left outer join
  • Right outer join /right join
  • Full outer join
  • Self- join

3 of 10

Cross join �

  • Returns all rows from the first table in which each row from the first table is combined with all rows from the second table.

4 of 10

Natural join�

  • A join that compares, for equality, all the columns in the first table with corresponding columns that have the same name in the second table.

5 of 10

Inner join �

  • A join that uses a comparison opera-tor to match rows from two tables based on the values in common columns from each table. Inner joins are the most common type of join.

6 of 10

Left outer join �

  • Returns all the rows from the left table, not just the ones in which the joined columns match. If a row in the left table has no matching rows in the right table, the associated result row contains nulls for all SELECT-clause columns coming from the right table.

7 of 10

Right outer join /right join�

  • The reverse of a left outer join. All rows from the right table are returned. Nulls are returned for the left table if a right-table row has no matching left-table row.

8 of 10

Full outer join �

  • Returns all rows in both the left and right tables. If a row has no match in the other table, the SELECT-clause columns from the other table contain nulls. If there is a match between the tables, the entire result row contains values from both tables.

9 of 10

Self- join�

  • A join of a table to itself.

10 of 10