--新建序列
-- Create sequence
create sequence Q_TPA_ACITIVE_ALARMS_ID
minvalue 1
maxvalue 99999999999999999
start with 100
increment by 1
cache 100;
--触发器
create or replacetrigger "TR_TPA_ACITIVE_ALARMS_ID"
before insert on STD_NMOSDB.TPA_ACTIVE_ALARMS
for each row
declare
-- local variables here
begin
if :new.record_id is null then
selectQ_TPA_ACITIVE_ALARMS_ID.nextval into :new.record_id from dual;
end if;
endTR_TPA_ACITIVE_ALARMS_ID;