The query below lists all tables that was modified in the last 30 days by ALTER statement.
Query
select schema_name(schema_id) as schema_name,
name as table_name,
create_date,
modify_date
from sys.tables
where modify_date > DATEADD(DAY, -30, CURRENT_TIMESTAMP)
order by modify_date desc;
Columns
- schema_name - schema name
- table_name - table name
- create_date - table creation date
- modify_date - last update time of table (by ALTER statement)
Rows
- One row: represents one table in a schema
- Scope of rows: all tables which was last modified in the last 30 days in all schemas
- Ordered by: modify time descending