Oracle Tutorial

Inner Join Examples

Example 1

Select c.contract_id, p.product_id, p.amount
From products p, contracts c
Where p.product_id = c.product_id
And p.amount > 3500

Result:

CONTRACT_IDPRODUCT_IDAMOUNT
202366912000.00
34087205000.00
4078105 9000.00

Example 2

Select cu.customer_id, cu.name,
c.contract_id, p.product_id,
p.amount
From customers cu,
products p,
contracts c
Where c.customer_id = cu.customer_id
And p.product_id = c.product_id
And p.amount > 3500

Result:

CUSTOMER_IDNAMECONTRACT_IDPRODUCT_IDAMOUNT
1CUSTOMER_1202366912000.00
2CUSTOMER_234087205000.00
3CUSTOMER_34078105 9000.00