我在生成 Oracle 基础的 SQL 文件中有三个触发器。当我启动文件时,我没有“触发器已创建”的消息,并且似乎在触发器创建时执行被锁定(我之前对所有内容都有创建确认)。
你能帮助我吗 ?以下是触发器:
CREATE TRIGGER TrainInfo_nbDispo1e_update_tr
BEFORE UPDATE ON TrainInfo
FOR EACH ROW
BEGIN
IF :NEW.nbDispo1e != :OLD.nbDispo1e
THEN
RAISE_APPLICATION_ERROR(-20101, 'Blahblahblah');
END IF;
END;
CREATE TRIGGER TrainInfo_nbDispo2e_update_tr
BEFORE UPDATE ON TrainInfo
FOR EACH ROW
BEGIN
IF :NEW.nbDispo2e != :OLD.nbDispo2e
THEN
RAISE_APPLICATION_ERROR(-20101, 'Blahblahblah');
END IF;
END;
CREATE TRIGGER Trajet_Distance_update_tr
BEFORE UPDATE ON Trajets
FOR EACH ROW
BEGIN
IF :NEW.distance != :OLD.distance
THEN
RAISE_APPLICATION_ERROR(-20101, 'Blahblahblah');
END IF;
END;