Skip to content

Instantly share code, notes, and snippets.

@jetstreamin
Created July 31, 2018 13:20
Show Gist options
  • Save jetstreamin/86a73be43b31d32832901f81a58b4c96 to your computer and use it in GitHub Desktop.
Save jetstreamin/86a73be43b31d32832901f81a58b4c96 to your computer and use it in GitHub Desktop.
SQL Server - Last Update of a Table
declare @objectid int
select @objectid = object_id from sys.objects where name = 'documents'
select top 50
db_name(database_id) as [DbName]
, *
from sys.dm_db_index_usage_stats where object_id = @objectid
and last_user_update is not null
order by last_user_update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment