Note
This view is available starting with V2.2.30.
Purpose
This view displays all views in the current tenant.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| OWNER | VARCHAR2(128) | NO | The user to which the view belongs. |
| VIEW_NAME | VARCHAR2(128) | NO | The name of the view. |
| TEXT_LENGTH | NUMBER | NO | The length of the view definition. |
| TEXT | VARCHAR2(4000) | NO | The text of the view. |
| OID_TEXT_LENGTH | NUMBER | NO | This column is not supported. The value of this column is NULL by default. |
| OID_TEXT | VARCHAR2(4000) | NO | This column is not supported. The value of this column is NULL by default. |
| VIEW_TYPE | VARCHAR2(30) | NO | This column is not supported. The value of this column is NULL by default. |
| SUPERVIEW_NAME | VARCHAR2(30) | NO | This column is not supported. The value of this column is NULL by default. |
| EDITIONING_VIEW | VARCHAR2(1) | NO | This column is not supported. The value of this column is NULL by default. |
| READ_ONLY | VARCHAR2(1) | NO | This column is not supported. The value of this column is NULL by default. |
| CONTAINER_DATA | VARCHAR2(1) | NO | This column is not supported. The value of this column is NULL by default. |
| BEQUEATH | VARCHAR2(12) | NO | This column is not supported. The value of this column is NULL by default. |
| ORIGIN_CON_ID | NUMBER | NO | This column is not supported. The value of this column is NULL by default. |
| DEFAULT_COLLATION | VARCHAR2(100) | NO | This column is not supported. The value of this column is NULL by default. |
| CONTAINERS_DEFAULT | VARCHAR2(3) | NO | This column is not supported. The value of this column is NULL by default. |
| CONTAINER_MAP | VARCHAR2(2) | NO | This column is not supported. The value of this column is NULL by default. |
| EXTENDED_DATA_LINK | VARCHAR2(3) | NO | This column is not supported. The value of this column is NULL by default. |
| EXTENDED_DATA_LINK_MAP | VARCHAR2(3) | NO | This column is not supported. The value of this column is NULL by default. |
| HAS_SENSITIVE_COLUMN | VARCHAR2(3) | NO | This column is not supported. The value of this column is NULL by default. |
| ADMIT_NULL | VARCHAR2(3) | NO | This column is not supported. The value of this column is NULL by default. |
| PDB_LOCAL_ONLY | VARCHAR2(3) | NO | This column is not supported. The value of this column is NULL by default. |
Sample query
Query the information of the view VIEW2 in the current tenant.
obclient [SYS]> SELECT OWNER, VIEW_NAME, TEXT_LENGTH, TEXT FROM SYS.DBA_VIEWS WHERE VIEW_NAME='VIEW2';
The query result is as follows:
+-------+-----------+-------------+--------------------------------------------+
| OWNER | VIEW_NAME | TEXT_LENGTH | TEXT |
+-------+-----------+-------------+--------------------------------------------+
| SYS | VIEW2 | 42 | SELECT "A","B" FROM tbl2 WHERE tbl2.b > 1 |
+-------+-----------+-------------+--------------------------------------------+
1 row in set
References
Query all views accessible to the current user: ALL_VIEWS
Query views owned by the current user: USER_VIEWS
For more information about the syntax of creating a view, see CREATE VIEW.