CREATE PROCEDURE NewOrderLine
@OrderID integer, @ProductID integer, @quantity integer
AS
DECLARE @ProductPrice money
SET @ProductPrice=(SELECT UnitPrice FROM Products WHERE ProductID=@ProductID)
INSERT INTO [Order Details] (OrderID, ProductID, Quantity, UnitPrice)
VALUES (@OrderID, @ProductID, @Quantity, @ProductPrice)
GO
