答案 0 :(得分:0)
从删除查询中删除*
。然后它就能正常运行
CREATE PROCEDURE `sp_test`()
Begin
UPDATE Decks
JOIN Amount ON amount.DeckName = decks.DeckName
SET decks.DeckTotal = Decks.DeckTotal - Decks.DeckTotal
WHERE Amount.AmountName =1;
UPDATE Types t1
JOIN Cards ON cards.TypeName = t1.TypeName
JOIN Amount ON amount.CardName = Cards.CardName
SET t1.TypeTotal = t1.TypeTotal - Amount.Amount
WHERE Amount.CardName = @aName;
DELETE
FROM Amount
WHERE CardName = @aName;
end