INNER JOIN example and syntax

Submitted by:Pitter Alderson

Date added:07 January, 2016

Category:PL SQL

The INNER JOIN keyword return rows when there is at least one match in both tables.

Tags: inner join , join syntax

Code Snippet:

SELECT column_name(s)
FROM table_name1
INNER JOIN table_name2
ON table_name1.column_name=table_name2.column_name

-- for example:
SELECT Person.LastName, Person.FirstName, Sales.OrderNo
FROM Person
INNER JOIN Sales
ON Person.P_Id=Sales.P_Id
ORDER BY Person.LastName
 
 

Comments