a guest Feb 20th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- select ProductName, OrderDetails.OrderID
- from Products inner join OrderDetails
- on OrderDetails.ProductID=Products.ProductID where
- select P.ProductName, D.OrderID, Case When D.OrderID Is Null Then 'No Comprado' Else 'Comprado' End Estado
- from Products P
- left join OrderDetails D on D.ProductID=P.ProductID
- where D.OrderID='10256'
RAW Paste Data