B.10 Content of SQL_VIEW_TABLE_USAGE
SQL_VIEW_TABLE_USAGE stores information about the underlying tables of a viewed table. Each row stores information for one underlying table.
If the defined underlying table of the viewed table is a viewed table, that viewed table's underlying tables' information is also stored. All information is stored up until the viewed table's underlying tables become base tables. The following figure shows an example.
- Explanation
-
The underlying tables of the viewed table V3 are viewed table V1 and viewed table V2. Therefore, information on the viewed table V3's underlying tables stored in SQL_VIEW_TABLE_USAGE consists of information not only for viewed tables V1 and V2, but also for base tables T1, T2, and T3.
The following table describes the content of SQL_VIEW_TABLE_USAGE.
No. |
Column name |
Data type |
Stored information |
---|---|---|---|
1 |
VIEW_SCHEMA |
VARCHAR(100) |
Schema name of the viewed table |
2 |
VIEW_NAME |
VARCHAR(100) |
Table identifier of the viewed table |
3 |
VIEW_ID |
SMALLINT |
View ID |
4 |
TABLE_SCHEMA |
VARCHAR(100) |
Schema name of the underlying table |
5 |
TABLE_NAME |
VARCHAR(100) |
Table identifier of the underlying table |
6 |
TABLE_TYPE |
CHAR(1) |
Type of the underlying table
|
7 |
IS_DIRECT |
CHAR(1) |
Information on whether the table is defined as a directly underlying table
|