Forum Discussion
How to get last updated date of the table
Hello Experts,
I am looking for the date, when is the last update (delete, truncate and reinsert) was made on the table
I came across SYS.DM_DB_INDEX_USAGE_STATS table with LAST_USER_UPDATE column, but sometime it returns NULL, Shall I believe on it gives me what I am looking for
Regards,
Amit
5 Replies
- trkrishnanCopper ContributorI m looking for similar information of finding the last updated date time of a SQL Server table . If any one knows how to do it , please share
- lijetcartCopper Contributor
there is a good tools you can find out,easy to know createtime/updatetime
and it can support sqlserver
https://www.grapecity.com.cn/solutions/huozige
- olafhelperBronze Contributor
lijetcart , please no advertisement for 3rd-party products.
- olafhelperBronze Contributor
AmitGhotikar , Stats are not persisted, they returns only values for the runtime. Of SQL Server restart all stats get cleared, so the are not very reliable.
What are you looking for/trying to achieve here?
> truncate
TRUNCATE is more a DDL (drop+recreate table) then a DML command.
- trkrishnanCopper Contributorolafhelper I m trying to find the last updated time of a table stored in SQL server. Please let me know how to get it . This is required to show the last updated time of a table in a separate UI dashboard as well as further processing in our data pipeline to check for duplicate records across multiple tables.