SQL> ed <br/> wrote file afiedt. buf <br/> 1 create table update_info (<br/> 2 ua_id varchar (20) References users, <br/> 3 old_pwd varchar (20 ), <br/> 4 new_pwd varchar (20), <br/> 5 time timestamp <br/> 6 *) <br/> SQL>/<br/> table created. <br/> SQL> ed <br/> wrote file afiedt. buf <br/> 1 * select * from users <br/> SQL>/<br/> user_name user_pwd ua_id <br/> -------------------- ------------------ ---------- <br/> ymc 123456 9294234 <br/> br/> root 123456 12345678 <br/> SQL> ed <br/> wrote file afiedt. buf <br/> 1 create or replace trigger tri_updateinfo <br/> 2 after update <br/> 3 of user_pwd <br/> 4 on users <br/> 5 for each row <br/> 6 begin <br/> 7 insert <br/> 8 into update_info <br/> 9 values (: old. ua_id,: Old. user_pwd,: New. user_pwd, sysdate); <br/> 10 * end; <br/> SQL>/<br/> trigger created. </P> <p> SQL> select table_name from user_tables <br/> 2/<br/> table_name <br/> -------------------------- <br/> update_info <br/> photos <br/> user_album <br/> album_type <br/> Users <br/> SQL> ed <br/> wrote file afiedt. buf <br/> 1 * select * From update_info <br/> SQL>/<br/> No rows selected <br/> SQL> commit <br/> 2; <br/> commit complete. <br/> SQL> ed <br/> wrote file afiedt. buf <br/> 1 update users <br/> 2 set user_pwd = '000000' <br/> 3 * Where ua_id = '000000' <br/> SQL>/<br /> 1 row updated. <br/> SQL> ed <br/> wrote file afiedt. buf <br/> 1 * select * From update_info <br/> SQL>/<br/> ua_id old_pwd new_pwd <br/> -------------------- ------------------ hour <br/> time <br/>/> timeout <br/> 12345678 123456 654321 <br/>-11 08.26.34.000000 PM </P> <p> SQL> <br/>