标签:end bsp value create 数据 into 序列 数据表 each
create sequence DATA_ID_SEQ
minvalue 1
maxvalue 9999999999999999999999999999
start with 1 --从10000开始生成序列
increment by 1 --增量为1
cache 20;
create or replace trigger DATA_ID_GENERATOR
before insert on DATA_SYN_RECORD
for each row
begin
select DATA_ID_SEQ.nextval into :new.id from dual;
end;
DATA_ID_SEQ:自增序列 (名称随意)
DATA_ID_GENERATOR: 触发器(名称随意)
DATA_SYN_RECORD:数据表名
标签:end bsp value create 数据 into 序列 数据表 each
原文地址:https://www.cnblogs.com/zt2710/p/11172257.html