RE: create a very simple trigger...

RE: create a very simple trigger...

 

  

Hi,
Can you not just do :

insert into VALOR(dt_inser) select sysdate from dual; end trg_dt_inser;

However I don't think your trigger will work as you will get a mutating
table problem.

Cheers, Kev.

-----Original Message-----
From: David NGUYEN
[mailto:oracledba-ezmlmshield-x34906818.[Email address protected]
Sent: 06 September 2007 16:01
To: LazyDBA Discussion
Subject: create a very simple trigger...

hi experts,

i just want to create a trigger , that inserts into VALOR(dt_inser)
column the sysdate each time there is a insert commant on the VALOR
table.
i dont know how to declare sysdate.
(dt_inser date null) column .
thanks for your suggestions.

CREATE OR REPLACE TRIGGER trg_dt_inser
before insert
on VALOR for each row
begin
insert into VALOR(dt_inser) values('sysdate'); end trg_dt_inser;


david...


---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY To post a
dba job: http://jobs.lazydba.com To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html



Oracle LazyDBA home page