Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot

dm_db_index_usage_stats

This allows you to know if data in a table has been updated recently even if you don't have a DateUpdated column on the table.

SELECT OBJECT_NAME(OBJECT_ID) AS DatabaseName, last_user_update,* FROM sys.dm_db_index_usage_stats WHERE database_id = DB_ID( 'MyDatabase') AND OBJECT_ID=OBJECT_ID('MyTable') 

Code from: http://blog.sqlauthority.com/2009/05/09/sql-server-find-last-date-time-updated-for-any-table/

Information referenced from: SQL Server - What is the date/time of the last inserted row of a table?SQL Server - What is the date/time of the last inserted row of a table?

Available in SQL 2005 and later

dm_db_index_usage_stats

This allows you to know if data in a table has been updated recently even if you don't have a DateUpdated column on the table.

SELECT OBJECT_NAME(OBJECT_ID) AS DatabaseName, last_user_update,* FROM sys.dm_db_index_usage_stats WHERE database_id = DB_ID( 'MyDatabase') AND OBJECT_ID=OBJECT_ID('MyTable') 

Code from: http://blog.sqlauthority.com/2009/05/09/sql-server-find-last-date-time-updated-for-any-table/

Information referenced from: SQL Server - What is the date/time of the last inserted row of a table?

Available in SQL 2005 and later

dm_db_index_usage_stats

This allows you to know if data in a table has been updated recently even if you don't have a DateUpdated column on the table.

SELECT OBJECT_NAME(OBJECT_ID) AS DatabaseName, last_user_update,* FROM sys.dm_db_index_usage_stats WHERE database_id = DB_ID( 'MyDatabase') AND OBJECT_ID=OBJECT_ID('MyTable') 

Code from: http://blog.sqlauthority.com/2009/05/09/sql-server-find-last-date-time-updated-for-any-table/

Information referenced from: SQL Server - What is the date/time of the last inserted row of a table?

Available in SQL 2005 and later

Post Made Community Wiki
Source Link
Nathan Koop
  • 25.3k
  • 26
  • 95
  • 127

dm_db_index_usage_stats

This allows you to know if data in a table has been updated recently even if you don't have a DateUpdated column on the table.

SELECT OBJECT_NAME(OBJECT_ID) AS DatabaseName, last_user_update,* FROM sys.dm_db_index_usage_stats WHERE database_id = DB_ID( 'MyDatabase') AND OBJECT_ID=OBJECT_ID('MyTable') 

Code from: http://blog.sqlauthority.com/2009/05/09/sql-server-find-last-date-time-updated-for-any-table/

Information referenced from: SQL Server - What is the date/time of the last inserted row of a table?

Available in SQL 2005 and later