Difference between revisions of "Inner Join"

From rbachwiki
Jump to navigation Jump to search
Line 4: Line 4:
  FROM sales INNER JOIN product
  FROM sales INNER JOIN product
  ON sales.product_id = product.product_id;
  ON sales.product_id = product.product_id;
01-FEB-15 1269 200 Samsung F7100
01-JAN-15 1267 100 Mobile Cover
01-JAN-15 1267 101 iPhone
02-JAN-15 1268 100 Mobile Cover
09-FEB-15 1270 105 HTC 7800
09-FEB-15 1270 106 Microsoft Keyboard 7865
09-FEB-15 1270 101 iPhone


[[#Select Command|Back To Top]]-[[Main_Page| Home]] - [[Oracle_SQL|Category]]
[[#Select Command|Back To Top]]-[[Main_Page| Home]] - [[Oracle_SQL|Category]]

Revision as of 13:58, 1 November 2017

A join of two or more tables that returns only the matched rows is called an inner join

SELECT sales.sales_date, sales.order_id, sales.product_id, product.product_name
FROM sales INNER JOIN product
ON sales.product_id = product.product_id;
01-FEB-15	1269	200	Samsung F7100
01-JAN-15	1267	100	Mobile Cover
01-JAN-15	1267	101	iPhone
02-JAN-15	1268	100	Mobile Cover
09-FEB-15	1270	105	HTC 7800
09-FEB-15	1270	106	Microsoft Keyboard 7865
09-FEB-15	1270	101	iPhone

Back To Top- Home - Category