• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

doubt in oracle

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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;
/
 
Barry's not gonna like this. Barry's not gonna like this one bit. What is Barry's deal with tiny ads?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic