[求助]解析存储过程语句
ALTER Procedure OrdersDetail(
@OrderID int,
@UserID int,
@OrderDate datetime OUTPUT,
@OrderTotalCost money OUTPUT
)
AS
SELECT
@OrderDate = OrderDate
FROM
Orders
WHERE
OrderID = @OrderID
AND
UserID = @UserID
IF @@Rowcount = 1
BEGIN
SELECT
@OrderTotalCost = Cast(SUM(OrderContent.BookQuantity * OrderContent.UnitCost) as money)
FROM
OrderContent
WHERE
OrderID= @OrderID
SELECT
Book.BookID,
Book.BookName,
Book.ISBN,
OrderContent.UnitCost,
OrderContent.BookQuantity,
(OrderContent.BookQuantity * OrderContent.UnitCost) as ExtendedAmount
FROM
OrderContent
INNER JOIN Book ON OrderContent.BookID = Book.BookID
WHERE
OrderID = @OrderID
END
请 帮我指点下 红色的语句都是什么意思啊
还有正篇的语句的意思
请再给点这方面的语句的资料啊
谢谢大家了