SQL JOIN

A few main points about Joins are:

  • The Join clause is used to combine data of two or more tables into one temporary table.
  • Joins in sql combines data of two or more tables by common keys.
  • The temporary table is just logical, that is each table is still physically independent with its own structure after SQL Join.

ANSI standard SQL defines five types of JOIN :

  1. inner join,
  2. left outer join,
  3. right outer join,
  4. full outer join, and
  5. cross join.

In the process of joining, rows of both tables are combined in a single table.

Why SQL JOIN is used?

If you want to access more than one table through a select statement.

If you want to combine two or more table then SQL JOIN statement is used .it combines rows of that tables in one table and one can retrieve the information by a SELECT statement.

The joining of two or more tables is based on common field between them.

SQL INNER JOIN also known as simple join is the most common type of join.