Answers:
您也许可以从中得到一个想法
SELECT last_user_update
FROM sys.dm_db_index_usage_stats us
JOIN sys.tables t
ON t.object_id = us.object_id
WHERE database_id = db_id()
AND t.object_id = object_id('dbo.YourTable')
但其中的数据在服务重新启动后不会保留,并且可能无法满足您的要求(例如DELETE FROM T WHERE 1=0
,即使实际上未删除任何行,运行也会更新时间)
SELECT last_user_update, t.name FROM sys.dm_db_index_usage_stats us JOIN sys.tables t ON t.object_id = us.object_id WHERE database_id = db_id()