Jitu
asked on
Record Insertion/Update time
Is there a way to get the last record insert/update time in RDBMS. I am specifically looking if PostgreSQL database has a way to provide me this.
I know i can code for this in my every UPDATE/INSERT statement. But if i database can provide me this for every record without me doing any coding that would be great.
Help !!
I know i can code for this in my every UPDATE/INSERT statement. But if i database can provide me this for every record without me doing any coding that would be great.
Help !!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You have to store this information per row... again, this is not implemented by default, so you need to implement this on your own...
CHeers
CHeers
The accepted method is to use a trigger on UPDATE to put an entry in a LOG table. Then a simple SQL statement to find the entry.
Regards
Regards
ASKER
So u mean i would have to put a trigger on update on all my tables in the database ?
Absolutely...
ASKER
Thanks Angel !!!
Oh the strange ways of Databases. !
Oh the strange ways of Databases. !
ASKER
if PostgreSQL has a facility do let me know. I don;t think it would have !
ASKER
What i mean is - for any record in the database i should be able to find out when was the record last updated.