摘要:
SQL> create table a(id number,name varchar2(20)); Table created
SQL> create sequence seq_a_id start with 1 increment by 1; Sequence created
SQL> create or replace trigger tr_a 2 before insert on a 3 for each row 4 begin 5 select seq_a_id.nextval into :new.id from dual; 6 end; ... 阅读全文