Created
July 31, 2018 13:20
-
-
Save jetstreamin/86a73be43b31d32832901f81a58b4c96 to your computer and use it in GitHub Desktop.
SQL Server - Last Update of a Table
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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