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.
請幫我解決這個問題