Professional Documents
Culture Documents
SQL INNER JOIN clause is used to combine and extract rows from two or more tables by
joining common field. This common field column is compared by comparison operators like
=, <, >, <=, >= or <>. INNER JOIN is also called as equi-join and returns those rows with
equal value in join column. INNER JOIN and JOIN both are same and provides similar
output.
Syntax
SELECT columnName(s)
FROM Table1 INNER JOIN Table2
ON Table1.columnName = Table2.columnName
Refer below image to understand INNER JOIN, here green part is output for INNER 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
You can see the output by joining two tables in result pane where required data is sorted
by OrderDate column.
Let’s consider one more example with greater than operator (>) where OrderDate column
is greater than 13-Aug-2015.
Also Refer:
SQL JOINS
SQL LEFT JOIN
SQL RIGHT JOIN
SQL FULL JOIN
SQL CROSS JOIN