Today's question comes from Irete P.:
I'd like to know the last date all of the tables in a database were updated. Is there some stored procedure I can use?
Sort of. The
sysobjects table contains the creation date of the table - a column called
crdate, I believe.
But I'm guessing that you'd like to know the last date/time the *data* in the table was updated. Sorry, you'll have to do this manually by creating an INSERT/UPDATE trigger on the table that modifies the "last updated" date in another table - probably some sort of master "last updated" table that you've created.
You could also add a "last updated" column to every table and have a trigger update that. Then you could select the max value out of the column.
|Read Other SQL Guru Questions|