Here’s a simple SQL Server 2005/2008 T-SQL query that lists the tables of the AdventureWorks database that were modified in the last 30 days:
USE AdventureWorks;
GO
SELECT name AS [TableName],
SCHEMA_NAME(schema_id) AS [Schema],
modify_date as [ModifyDate]
FROM sys.objects
WHERE modify_date > GETDATE() - 30
and type_desc = 'USER_TABLE'
GO
Note: To list all the objects like Constrains, Triggers etc of the AdventureWorks database that were modified in the last 30 days, just remove this line and type_desc = 'USER_TABLE' from the query and execute the query again.
Is there a way to add this as a column into sql management studio within the object explorer details tab
ReplyDeleteThis is not the right. Because ALTER INDEX also changes the Modify Date on the table.
ReplyDelete