问题描述
- 触发器无效且重新验证错误
-
CREATE OR REPLACE TRIGGER "CUSTOMER_SEQ"
BEFORE INSERT ON CUSTOMER
REFERENCING OLD AS OLD NEW AS NEW FOR EACH ROWDECLARE
BEGIN
SELECT CUSTOMER_SEQ.NEXTVAL INTO:NEW.custid FROM DUAL;
END CUSTOMER_SEQ;这是我在网上找的自己在改一下,大家看看哪里不对,谢谢了
解决方案
最后END后面的触发器名去掉就可以啦!
CREATE OR REPLACE TRIGGER "CUSTOMER_SEQ"
BEFORE INSERT ON CUSTOMER
REFERENCING OLD AS OLD NEW AS NEW FOR EACH ROW
DECLARE
BEGIN
SELECT CUSTOMER_SEQ.NEXTVAL INTO:NEW.custid FROM DUAL;
END;
时间: 2024-10-07 12:09:02