SQL Joins: Inner Join
SQL Joins: Inner Join
SQL Joins: Inner Join
SQL JOIN clause is used to combine and extract rows from two or more tables by joining
common field. These joins are specified with FROM or WHERE clause mostly. Kindly note
that INNER JOIN clause and JOIN clause both are same and you will get the same output.
There are different types of SQL JOINs as listed below.
INNER JOIN
Equi-Joins
Natural Joins
OUTER JOIN
LEFT JOIN (also called LEFT OUTER JOIN)
RIGHT JOIN (also called RIGHT OUTER JOIN)
FULL JOIN (also called FULL OUTER JOIN)
CROSS JOIN
Here we will consider one example for INNER JOIN condition where we will use
two tables named as SalesDetails and ClientDetails.
Table Name: SalesDetails
Table Name: ClientDetails
From above two tables, we need columns OrderID and OrderDate from SalesDetails table
and one column ClientName from ClientDetails table and sorted in ascending
order by OrderDate column. So to get the output from two tables we will use INNER JOIN
query as given below.
Also Refer:
SQL INNER JOIN
SQL LEFT JOIN
SQL RIGHT JOIN
SQL FULL JOIN
SQL CROSS JOIN