0
任何人都可以發現此存儲過程的問題嗎? MySQL是報告以下錯誤: 1048列「的categoryID」不能爲空保存到變量中的SQL存儲過程
DELIMITER $$
CREATE PROCEDURE catalogue_assign_product_to_subcategory(
IN inProductId INT,
IN insubCategoryId INT)
BEGIN
DECLARE catID INT;
SELECT subcategoryParent FROM tblSubcategory
WHERE subcategoryID = insubCategoryId INTO catID;
INSERT INTO tblProdCat (productID, categoryID)
VALUES (inProductId, 'catID');
END