Table Name:User_table
Uname pwd expire_date update_pwd_date
-------------------------------------------------------------
aaa aaa 30-AUG-2013 null
bbb bbb 01-SEP-2013 null
ccc ccc 15-sep-2013 null
ddd ddd 29-SEP-2013 null
So when we are going to update pwd
column, it should automatically update update_pwd_date
column with current date(sysdate).
I want output like:
Uname pwd expire_date update_pwd_date
-------------------------------------------------------------
aaa eee 30-AUG-2013 23-AUG-2013
bbb fff 01-SEP-2013 23-AUG-2013
ccc ggg 15-sep-2013 23-AUG-2013
ddd hhh 29-SEP-2013 23-AUG-2013
Actually i am trying to use below trigger.But it's not working.
create or replace trigger user_trg
before update of pwd
on user_tab
for each row
declare
Pragma autonomous_transaction;
begin
update user_tab set pas_update=sys date where pwd=:new.pwd;
commit;
end;
Actually i am trying to below trigger.But it's not working.
create or replace trigger user_trg
before update of pwd
on user_tab
for each row
declare
Pragma
autonomous_transaction;
begin
update user_tab set pas_update=s
ys
date where p
wd
=:n
ew
.pw
d`;
commit;
end;
Please anybody can give solution for this query?