MS SQL Training (Joins) Part-4

Written by creation2018, September 3, 2018


SQL Joins
1. Inner Join
2. Outer Join
a.Left Outer Join
b.Right Outer Join
3. Self Join

Inner Join
select O.OrderId,C.Name as CustomerName, C.Email, C.Mobile, C.City, P.Name as ProductName, P.Price, O.OrderDate,(O.Quantity*P.Price) as TotalPrice
from Orders O
join Customers C
on C.CustomerId=O.Customer_Id
join Products P
on P.ProductId=O.Product_Id;