-- Create sequence
create sequence MFB_REGION_SEQ
minvalue 1
maxvalue 999999999
start with 6
increment by 1
nocache;
针对这个序列添加触发器。
CREATE OR REPLACE TRIGGER TGR_ID_MFB_REGION
BEFORE INSERT ON MFB_REGION FOR EACH ROW
BEGIN SELECT MFB_REGION_SEQ.NEXTVAL INTO :NEW.ID FROM DUAL; END;
ORACLE序列触发
时间: 2024-10-07 17:03:13