The query below lists all tables that was modified in the last 30 days.
Query
SELECT DatabaseName,
TableName,
LastAlterTimeStamp AS ModifyTime
FROM DBC.TablesV
WHERE LastAlterTimeStamp > CURRENT_TIMESTAMP - INTERVAL '30' DAY
ORDER BY LastAlterTimeStamp DESC;
Columns
- database_name - database (schema) name
- table_name - table name
- update_time - last update time of table by alter statement
Rows
- One row: represents one table in a database
- Scope of rows: all tables which was last modified in the last 30 days in all databases
- Ordered by: modify time descending