我创建了一些触发器,例如:
CREATE OR REPLACE TRIGGER TRIGGER_USER
BEFORE INSERT ON HOUSE_USER
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
WHEN (NEW.USER_ID IS NULL)
BEGIN
SELECT SEQ_USER_ID.NEXTVAL
INTO :NEW.USER_ID FROM DUAL;
END;
/
但我不能放弃它们。当我试图放弃它时:
DROP TRIGGER TRIGGER_USER;
我收到以下错误:
ORA-04080: trigger 'TRIGGER_USER' does not exist
我发现你必须告诉架构。我解雇了以下命令:
SELECT * FROM ALL_TRIGGERS WHERE TABLE_NAME = 'HOUSE_USER'
已交付:
OWNER: APEX
TRIGGER_NAME: TRIGGER_USER
所以我再次尝试:
DROP TRIGGER APEX.TRIGGER_USER;
但我又得到了错误:
ORA-04080: trigger 'TRIGGER_USER' does not exist
所以:我该如何删除触发器?
答案 0 :(得分:1)
您可能根本无权从APEX
用户中删除触发器。
请务必授予DROP ANY TRIGGER
。
错误消息“不存在”可能会导致混淆,因为它确实存在,只是用户无法访问。