Created
July 10, 2020 16:11
-
-
Save karenpayneoregon/2711f4edeaa9f374f6cafef479d265fc to your computer and use it in GitHub Desktop.
Get order items by order id
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE @OrderIdentifier INT= 10248; | |
SELECT p.ProductName, | |
od.ProductID, | |
od.UnitPrice, | |
od.Quantity, | |
od.Discount | |
FROM OrderDetails AS od | |
INNER JOIN Products AS p ON od.ProductID = p.ProductID | |
WHERE od.OrderID = @OrderIdentifier; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment