Welcome Back

Google icon Sign in with Google
OR
I agree to abide by Pharmadaily Terms of Service and its Privacy Policy

Create Account

Google icon Sign up with Google
OR
By signing up, you agree to our Terms of Service and Privacy Policy
Instagram
youtube
Facebook

Join Products with Suppliers to Retrieve Supplier Names

Join Products with Suppliers to Retrieve Supplier Names

products Table:

suppliers Table:

Query Explanation:
● SELECT Products.ProductName, Suppliers.SupplierName – Retrieves the product name and its corresponding   supplier name.
● FROM Products – Data will be fetched from the Products table.
● INNER JOIN Suppliers ON Products.SupplierID = Suppliers.SupplierID – Combines the Products and Suppliers tables using a common SupplierID, so we can get the matching supplier for each product.

 

SQL Query:

USE SalesInventoryDB;

SELECT products.ProductName,suppliers.SupplierName FROM products
inner join suppliers on products.SupplierID=suppliers.SupplierID;

 

Output: