Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> PL/SQL Triggers
Hello
Could anyone please explain me, how to make an trigger
which is inserting an sequence value to a tablefield when a
new record is inserted.
I have tried something like this:
create or replace trigger mytrigger
before insert on wintcc.alarm
begin
select seqmyname.nextval
into :new.alarmid
from dual;
end;
but this doesn't work, my eror msg is that
new.alarmid is invalid.
I can however declare a variable and then
select into this.
BUT how do insert the value into the table ????
Received on Fri May 30 1997 - 00:00:00 CDT