触发器上未声明的变量configid

z31licg0  于 2021-07-26  发布在  Java
关注(0)|答案(0)|浏览(116)
CREATE TRIGGER input_verification AFTER INSERT ON InputHistory
FOR EACH ROW
WHEN NO EXISTS (SELECT * FROM InputHistory JOIN Intput on InputHistory.inputId = Input.inputId WHERE InputHistory.inputId = NEW.inputId AND InputHistory.inputHistoryOrderNumber=Input.inputOrderNumber AND InputHistory.inputHistoryStatus >= 300)
BEGIN
    DECLARE configId INTEGER;
    SELECT Input.inputConfigurationId INTO configId FROM Input JOIN InputHistory ON Input.inputId = InputHistory.inputId WHERE NEW.inputId=Input.inputId;
    UPDATE Configuration SET configurationReady = true WHERE configurationId= configId;
END

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题