Link to home
Start Free TrialLog in
Avatar of Jamil Muammar
Jamil Muammar

asked on

Oracle SQL table - Time for last update / Change

Dear Experts,

 How do I know in Oracle SQL for specific table when ( the time ) it was last updated or changed ?

Thanks
Avatar of Alex [***Alex140181***]
Alex [***Alex140181***]
Flag of Germany image

Out-of-the-box and/or without any effort, there is no way to determine that. You could either turn on Oracle's audit options or (which I prefer more), add some audit columns to your tables, like CREATE_TS (creation timestamp), CREATE_USER (creation user), CHANGE_TS, CHANGE_USER.... With the help of one or more trigger(s), you may fill in the data needed for INSERT, UPDATE, DELETE...
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

>>it was last updated or changed ?

That is two possible questions:
The last time DDL was performed?
   Depending on your Oracle version there was a LAST_DDL_TIME added to the "_OBJECTS" view (DBA, ALL or USER:  USER_OBJECTS).  
The last time DML was performed?
   As suggested above:  I would use Auditing or a trigger.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.