create or replace TRIGGER SNO_INC_TRG
BEFORE INSERT ON Bsb
for each row
BEGIN
if inserting then
if :NEW."SNO" is null then
select SNO_SEQ.nextval into :NEW."SNO" from dual;
end if;
end if;
END;
This trigger is setting the next value of sequence into the column when the column named SNO has null value. This trigger gets executed before the insertion on table bsb and it will triggered every time the new row gets inserted.
BEFORE INSERT ON Bsb
for each row
BEGIN
if inserting then
if :NEW."SNO" is null then
select SNO_SEQ.nextval into :NEW."SNO" from dual;
end if;
end if;
END;
This trigger is setting the next value of sequence into the column when the column named SNO has null value. This trigger gets executed before the insertion on table bsb and it will triggered every time the new row gets inserted.
No comments:
Post a Comment