CREATE SEQUENCE TEMP_TEST_IDADD INCREMENT BY 1 START WITH
1;
2、在表temp_test上建立触发器如下
CREATE OR REPLACE TRIGGER
T_TEMP_TEST_IDADD BEFORE INSERT ON TEMP_TEST FOR EACH ROW BEGIN
SELECT TEMP_TEST_IDADD.NEXTVAL INTO :NEW.ID
FROM DUAL; END T_TEMP_TEST_IDADD;