CREATE SEQUENCE customers_seq START WITH 1000 INCREMENT BY 1 NOCACHE NOCYCLE;
CREATE OR REPLACE TRIGGER JOB_INSTANCE_BRI BEFORE INSERT ON JOB_INSTANCE FOR EACH ROW BEGIN SELECT JOB_INSTANCE_SEQ.nextval INTO :new.JOBINSTANCEID FROM dual;
END;
DROP SEQUENCE HIBERNATE_SEQUENCE;
CREATE SEQUENCE "HIBERNATE_SEQUENCE" INCREMENT BY 1 START WITH 1000 CACHE 100 NOORDER NOCYCLE;
select HIBERNATE_SEQUENCE.nextval from dual grant SELECT ON HIBERNATE_SEQUENCE to ROLE;
https://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_6015.htm
原文链接:https://www.f2er.com/oracle/213727.html