how can i write a query using three tables display more than products details by using joins [Resolved]

Posted by Rajesh123 under Oracle on 7/30/2015 | Points: 10 | Views : 774 | Status : [Member] | Replies : 1
using three tables display more than products details by using joins

rajesh.plsql123@gmail.com


Responses

Posted by: Shreedar on: 8/15/2015 [Member] Starter | Points: 50

Up
0
Down

Resolved
Hi

We have following three tables.
1.Product P
2.Order O
3.Quantity I

The join on above three tables

1. SELECT O. OrderNumber , CONVERT
(date,O. OrderDate ) AS Date,
2. P. ProductName , I. Quantity ,
I. UnitPrice
3. FROM [ Order ] O
4. JOIN OrderItem I ON O. Id = I. OrderId
5. JOIN Product P ON P. Id = I. ProductId
6. ORDER BY O. OrderNumber

Mark answer if you are satisfied.

Regards,
Sridhar Thota.

Regards

Sridhar Thota.
www.dotnet-sridhar.blogspot.com

Rajesh123, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response