1
StockID ItemID Quantity Price
表股票现在我要选择的数据这样
StockID ItemID Quantity Price TotalPrice(Quantity*Price)
我想这
ALTER PROC [dbo].[SelectItemStock]
@Item int
as
BEGIN
SELECT Stock.*, (SELECT Quantity*Price FROM Stock) AS TotalPrice
FROM Stock
WHERE ItemID = @Item
END
一些事情但它给了我错误Subquery returned more than 1 value.
请帮我解决这个问题