Cheap VPS & Xen Server


Residential Proxy Network - Hourly & Monthly Packages

Oracle INNER JOIN


Inner Join is the simplest and most common type of join. It is also known as simple join. It returns all rows from multiple tables where the join condition is met.

Syntax

  1. SELECT columns
  2. FROM table1
  3. INNER JOIN table2
  4. ON table1.column = table2.column;

Image representation of Inner Join

inner-join1

Oracle INNER JOIN Example

Let’s take an example to perform Inner Join on two tables “Suppliers” and “Order1”.

Suppliers

inner-join2

inner-join-supplier

Order1

inner-join3

This example will return all rows from “suppliers” and “order1” table where there is a matching supplier_id value in both the suppliers and order1 tables.

Execute the following query

  1. SELECT suppliers.supplier_id, suppliers.supplier_name, order1.order_number
  2. FROM suppliers
  3. INNER JOIN order1
  4. ON suppliers.supplier_id = order1.supplier_id;

Output

inner-join4

Comments

comments