Oracle Time Stamp

Is there a way we can put a column in 'history' table that would keep the time, at which transaction x was commited?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Add a colume with data type of Date.
Whenever you insert/update a record, insert/update the column with the value of sysdate.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
As Xiaodong said add new field for date field and do the followings

1. Use Trigger to update new field automatically on insert/update of record.

2. If you do not update records in history table then user default sysdate to update date and time of insertion.  

If you do not update history records then I recommend second method because there is no coding.
You follow the following steps

1. To include column in the history table using the following syntax
    SQL >     ALTER TABLE history ADD (record_date DATE);
2. Now write a DATA BASE TRIGGER for history which will take care to insert or update
   the  RECORD_DATE by using the following SYNTAX

   CREATE TRIGGER history_trigger
       :NEW.record_date := SYSDATE;
3. Execute the above trigger which will fire whenever you insert or update the record
   and change the  update the committed time accordingly.

Since the question is locked, I could'nt able to answer you.

This is tested and it works fine
I hope this is acceptable to you - sganta

Hello !

I have posted my answer as a comment. Since the Question is locked, I could'nt able
to put in to answer column.

If you are interested in xiaodong's answer please accept this. Otherwise
reject this. If you are not interested in my answer (comment). Send a comment
so that another expert can give better solution. You've taken so much time.
What happened ?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.