Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Help writing simple trigger.
tim.mcconechy wrote
>CREATE TRIGGER UPD_TRG
>BEFORE INSERT OR UPDATE ON dbstruct
>BEGIN
> user_name=user
> lastedit_date=sysdate
> recno=dbstructseq.nextval
>END;
This is not your actual code, is it? I can hardly imagine Oracle prompts you
about mutating tables while even the semicolons are missing...
create or replace trigger biu_dbstruct
before insert or update on dbstruct
for each row
begin
:new.user_name = user;
:new.lastedit_date = sysdate;
if :new.recno is null then
select dbstructseq.nextval into :new.recno from dual;
Arjan. Received on Sat Feb 27 1999 - 03:36:41 CST