create or replace TRIGGER "abcd".TUNNEL_HISTORY_TRIGGER
BEFORE INSERT
ON TUNNEL_HISTORY
FOR EACH ROW
DECLARE
next_id NUMBER;
BEGIN
SELECT TUNNEL_HISTORY_SEQUENCE.NEXTVAL
INTO next_id
FROM dual;
BEFORE INSERT
ON TUNNEL_HISTORY
FOR EACH ROW
DECLARE
next_id NUMBER;
BEGIN
SELECT TUNNEL_HISTORY_SEQUENCE.NEXTVAL
INTO next_id
FROM dual;
:NEW.HISTORY_ID := next_id;
END;
END;
本文转自 jxwpx 51CTO博客,原文链接:http://blog.51cto.com/jxwpx/193879,如需转载请自行联系原作者