创建序列

    1. CREATE SEQUENCE API_ATTENDANCE _sequence
    2. MAXVALUE 9999999999999
    3. MINVALUE 1
    4. START WITH 1
    5. INCREMENT BY 1
    6. CACHE 20;

    创建触发器

    1. create trigger API_ATTENDANCE _trig before
    2. insert on API_ATTENDANCE for each row
    3. begin
    4. select API_ATTENDANCE _sequence .nextval into:new.id from dual;
    5. //select 序列.nextval into: new.id
    6. end;