1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Alternative to Triggers

Discussion in 'SQL PL/SQL' started by hiswapna, Aug 20, 2009.

  1. hiswapna

    hiswapna Active Member

    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    80
    Hi

    I have around 400+ tables where I have a column last_updated_time in all the tables.

    The value of this column is set default to sysdate at table creation.

    so all inserts will have a sysdate as default in this column.

    How about updates. When ever I update the table row, this column should contain the updated time. I know that trigger is the answer but I dont want to create 400 triggers to achieve this and I can touch all the procs/ front end forms etc to modify the update statement to include the last update column also.

    Is there any other way to acheived this...may be in oracle 10g/11i...latest versions facilities..etc...

    Regards
    Swapna
     
  2. tyro

    tyro Forum Genius

    Messages:
    368
    Likes Received:
    20
    Trophy Points:
    260
    Location:
    India
    Hi, since you cannot change the update statements and don't want to write bulk triggers, I don't really see how you can update your table column. However if you are interested in only Auditing your tables, you should take a look at Oracle Audit. A very good feature is Database Change Notification which you can consider implementing.