SESSION NAME: Joins and Unions-2.

QUESTION NAME: Joins of two tables - Hackers.


TABLE DESCRIPTION:

Write a Query to Join the following tables - Use Inner Join

1. We have a table called joins_suppliers with two fields
(supplier_id and supplier_name)


2. We have another table called orders with three fields
(order_id, supplier_id, and order_date)


Write the query to get the following result set

supplier_id name order_year
10000 IBM 2013
10001 Hewlett Packard 2016


CODE:

select  joins_suppliers.supplier_id,  joins_suppliers. supplier_name,
orders.order_year from  joins_suppliers Inner Join orders on
joins_suppliers.supplier_id = orders.supplier_id ;