这是建立sequence
1create sequence TEST_SEQ
2
3 minvalue 1
4
5 maxvalue 999999999999999999999999999
6
7 start with1
8
9 increment by1
10
11 cache 20;
这是建立trigger的
CREATEORREPLACETRIGGER " TEST_TRI" BEFORE
INSERTON TEST
FOR EACH ROW
BEGIN
SELECT test_seq.NEXTVAL INTO :NEW.ID FROM DUAL;
END;