Find recently modified tables in Azure SQL database

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

Sample results

Comments are only visible when the visitor has consented to statistics cookies. To see and add comments please accept statistics cookies.
0
There are no comments. Click here to write the first comment.