Retrieving catalog information about views

For every view you create, Db2 stores descriptive information in several catalog tables. Query these catalog tables to obtain information about views in your database.

About this task

Begin general-use programming interface information.

The following actions occur in the catalog after the execution of CREATE VIEW:

  • A row is inserted into the SYSIBM.SYSTABLES table.
  • A row is inserted into the SYSIBM.SYSTABAUTH table to record the owner's privileges on the view.
  • For each column of the view, a row is inserted into the SYSIBM.SYSCOLUMNS table.
  • One or more rows are inserted into the SYSIBM.SYSVIEWS table to record the text of the CREATE VIEW statement.
  • A row is inserted into the SYSIBM.SYSVIEWDEP table for each database object on which the view is dependent.
  • Start of changeA row is inserted into the SYSIBM.SYSDEPENDENCIES table for each database object on which the view is dependent.End of change

End general-use programming interface information.

Procedure

To obtain information about views:

Query one or more catalog tables.