我试图将值插入表A,然后在一个存储过程中更新表B中的值。
UPDATE Devices
SET Devices.Available = 1
WHERE Devices.DeviceID = DeviceID;
INSERT INTO Withdrawals(Withdrawals.DeviceID,
Withdrawals.StudentID,
Withdrawals.WithdrawalDate,
Withdrawals.Deadline)
VALUES(DeviceID,
StudentID,
CURRENT_DATE,
DATE_ADD(CURRENT_DATE, INTERVAL 7 DAY));
每个查询在单独执行时均有效。我已经研究了如何做到这一点,并相信它是正确的方法,但是由于某种原因它没有执行?