创建序列
-- Create sequence
create sequence SEQUENCE_ACCESSORY
minvalue 1
maxvalue 99999999999999999999999999
start with 1
increment by 1
cache 10
order;
创建触发器
create or replace trigger TRIGGER_accessory
before insert on accessory
for each row
declare
-- local variables here
begin
select sequence_accessory.nextval into:new.ID from dual;
end TRIGGER_accessory;
sequence_accessory中把表名换成自己的表名sequence_table