CREATE SEQUENCE id ( START WITH 1 INCREMENT BY 1Insert into aa( ID) VALUES( id.nextval)
序列 正如dihai2000(haifeng)所言
CREATE SEQUENCE customers_seq START WITH 1000 INCREMENT BY 1 NOCACHE NOCYCLE;create trigger a_tri before insert on a for each row begin select customers_seq.nextval into :new.id from dual; end; /
START WITH 1
INCREMENT BY 1Insert into aa(
ID)
VALUES(
id.nextval)
正如dihai2000(haifeng)所言
START WITH 1000
INCREMENT BY 1
NOCACHE
NOCYCLE;create trigger a_tri
before insert on a
for each row
begin
select customers_seq.nextval into :new.id from dual;
end;
/