• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

doubt in oracle

 
kranthiswaroop talluri
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hai friends.iam making an web sites in that i have a doubt.in oracle i had created a table name swa when ever i insert values in it,it has to update the table plus what i had inserted in the table ie the values are to be entered in text document automatically is it possible.please reply soon if you cant understand my doubt please reply i will explain.if you know please send me code
 
Arief Setiawan
Greenhorn
Posts: 12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
did you means create some kind of log?
maybe you can use trigger on your table

CREATE OR REPLACE TRIGGER trigger_name
after update on table_name
for each row
begin
-- do something here
insert into your_table_log(dateupdate,oldvalue,newvalue) values(sysdate, ld.your_column,:new.yourcolumn)
end;
/
 
Arief Setiawan
Greenhorn
Posts: 12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i'm sorry...
add commit after you insert log

CREATE OR REPLACE TRIGGER trigger_name
after update on table_name
for each row
begin
-- do something here
insert into your_table_log(dateupdate,oldvalue,newvalue) values(sysdate, ld.your_column,:new.yourcolumn);
commit;
end;
/
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic