create table factory_carSave ( id number, name varchar2(10), age number ) --create table finished create sequence SEQ_CCAR_ID minvalue 1 maxvalue 1000000000 start with 1 increment by 1 cache 20 --create sequence finished create or replace trigger carS before insert on factory_carSave for each row begin select SEQ_CCAR_ID.nextval into :new.id from Dual; end; --create trigger finish --test date insert into factory_carSave (name) values ('xiaoguo'); commit;