你好,
如果您需要检查在某个表上进行DML操作(插入,更新,删除)的最新更新时间,你可以使用以下查询:
SELECT OBJECT_NAME(OBJECT_ID) AS TableName, last_user_update,*
FROM sys.dm_db_index_usage_stats
WHERE database_id = DB_ID( 'DATABASE Name')
AND OBJECT_ID=OBJECT_ID('TABLE Name')
或者在表上创建触发器以记录最后修改日期- 或使用诸如SQL Server 2008及更高版本中的Change Data Capture之类的功能。
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to
MSDN Support, feel free to contact MSDNFSF@microsoft.com.