1.创建序列 代码 -- Create sequence create sequence seq_userinfo minvalue 1 start with 1 increment by 1;
2.创建触发器 代码 create or replace trigger tigger_userinfo before insert on userinfo for each row declare begin select SEQ_userinfo.nextval into:New.id from dual; end tigger_userinfo;