left join and left outerjoin

At the top level there are mainly 3 types of joins:

  1. INNER
  2. OUTER
  3. CROSS

  1. INNER JOIN - fetches data if present in both the tables.
  2. OUTER JOIN are of 3 types:
    1. LEFT OUTER JOIN - fetches data if present in the left table.
    2. RIGHT OUTER JOIN - fetches data if present in the right table.
    3. FULL OUTER JOIN - fetches data if present in either of the two tables.
  3. CROSS JOIN, as the name suggests, does [n X m] that joins everything to everything.
    Similar to scenario where we simply lists the tables for joining (in the FROM clause of the SELECT statement), using commas to separate them.

No comments:

Post a Comment