第一步:
DROP sequence self_increasing_seq; CREATE sequence self_increasing_seq minvalue 1 MAXVALUE 99999999 increment BY 1 START WITH 1;
第二步:
CREATE OR REPLACE TRIGGER self_increasing_trigger BEFORE INSERT ON ENTRY_GOODS FOR EACH ROW BEGIN SELECT self_increasing_seq.nextval INTO : new.ID FROM DUAL; END;
搞定