2 newbie programmer Newbie_Programmer 于 2015.07.14 14:42 提问

触发器无效且重新验证错误

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 CUSTOMER_SEQ;

        这是我在网上找的自己在改一下,大家看看哪里不对,谢谢了

1个回答

taomanman
taomanman   Rxr 2015.07.14 20:47

最后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;

Newbie_Programmer
Newbie_Programmer 谢谢了 老师已经帮我弄好了
2 年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片