日期:2014-05-16 浏览次数:20772 次
-- Create sequence
create sequence SEQ_ISSUE_POLICY_NONVEH
minvalue 1
maxvalue 9999999999999999999999999999
start with 3931941
increment by 1
cache 20
order;
CREATE OR REPLACE TRIGGER "trg_issue_policy_nonveh_insert"
BEFORE INSERT ON "DP"."ISSUE_POLICY_NONVEH_T"
FOR EACH ROW
DECLARE
seqno NUMBER;
BEGIN
select DP.Seq_Issue_Policy_nonVeh.nextval into seqno FROM dual;
:NEW.serialno := seqno ;
END;
select
*
from dp.issue_policy_nonveh_t
where serialno /2 = 0
CREATE OR REPLACE TRIGGER "trg_issue_policy_veh_insert" BEFORE INSERT ON "DP"."ISSUE_POLICY_VEH_T" FOR EACH ROW
DECLARE
seqno NUMBER;
BEGIN
select DP.Seq_Issue_Policy_Veh.nextval into seqno FROM dual;
:NEW.serialno := seqno ;
END;