----t_pol_main为插入的表名,其中policy_id 为此表的一个要自动增加的字段
create or replace trigger tri_policy_id
before insert on t_pol_main
referencing old as old new as new
for each row
declare
num number;
begin
select N_POLICY_ID.Nextval into num from dual;
:new.policy_id := num;
end;
create or replace trigger tri_policy_id
before insert on t_pol_main
referencing old as old new as new
for each row
declare
num number;
begin
select N_POLICY_ID.Nextval into num from dual;
:new.policy_id := num;
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货