Forum Discussion
AmitGhotikar
Feb 28, 2022Copper Contributor
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...
olafhelper
Feb 28, 2022Bronze 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.
- trkrishnanSep 07, 2022Copper 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.