答案 0 :(得分:3)
您需要更改SELECT语句。现在你要回来了,你传给SP的是什么。
// Incorrect, you just pass it as SP arguments
SELECT @id, @name, @price, @categoryID
FROM Products
WHERE name = @name;
// Actual data, retrieved from table
SELECT id, name, price, categoryID
FROM Products
WHERE name = @name;