日期:2014-05-17 浏览次数:20690 次
create or replace trigger tri_changeno
before insert on changes
for each row
declare
nextid number;
begin
IF :new.changeno IS NULL or :new.changeno=0 THEN
select seq_changeno.nextval
into nextid
from sys.dual;
:new.changeno:=nextid;
end if;
end tri_changeno;
select 'IT2013'
------解决方案--------------------
seq_changeno.nextval