Find recently created tables in Db2 database

Query below lists all tables that were created within the last 20 days

Query

select tabschema as schema_name,
       tabname as table_name,
       create_time
from syscat.tables
where create_time > CURRENT DATE - 20
order by create_time desc,
         schema_name,
         table_name;

Columns

  • schema_name - schema name
  • table_name - table name
  • create_time - table's creation date

Rows

  • One row represents one table in a database
  • Scope of rows: all tables in IBM DB2 database that were created within the last 20 days
  • Ordered by table's creation date (descending), schema name, table name

Sample results

0
There are no comments. Click here to write the first comment.