Note
This view is available starting with V2.2.30.
Purpose
This view displays the views accessible to the current user.
Applicability
This view is applicable only to OceanBase Database in Oracle mode.
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 definition of the view. |
| OID_TEXT_LENGTH | NUMBER | NO | This column is not supported. It is NULL by default. |
| OID_TEXT | VARCHAR2(4000) | NO | This column is not supported. It is NULL by default. |
| VIEW_TYPE | VARCHAR2(30) | NO | This column is not supported. It is NULL by default. |
| SUPERVIEW_NAME | VARCHAR2(30) | NO | This column is not supported. It is NULL by default. |
| EDITIONING_VIEW | VARCHAR2(1) | NO | This column is not supported. It is NULL by default. |
| READ_ONLY | VARCHAR2(1) | NO | This column is not supported. It is NULL by default. |
| CONTAINER_DATA | VARCHAR2(1) | NO | This column is not supported. It is NULL by default. |
| BEQUEATH | VARCHAR2(12) | NO | This column is not supported. It is NULL by default. |
| ORIGIN_CON_ID | NUMBER | NO | This column is not supported. It is NULL by default. |
| DEFAULT_COLLATION | VARCHAR2(100) | NO | This column is not supported. It is NULL by default. |
| CONTAINERS_DEFAULT | VARCHAR2(3) | NO | This column is not supported. It is NULL by default. |
| CONTAINER_MAP | VARCHAR2(2) | NO | This column is not supported. It is NULL by default. |
| EXTENDED_DATA_LINK | VARCHAR2(3) | NO | This column is not supported. It is NULL by default. |
| EXTENDED_DATA_LINK_MAP | VARCHAR2(3) | NO | This column is not supported. It is NULL by default. |
| HAS_SENSITIVE_COLUMN | VARCHAR2(3) | NO | This column is not supported. It is NULL by default. |
| ADMIT_NULL | VARCHAR2(3) | NO | This column is not supported. It is NULL by default. |
| PDB_LOCAL_ONLY | VARCHAR2(3) | NO | This column is not supported. It is NULL by default. |
Sample query
Query the information about the view VIEW2 in the list of views accessible to the current user.
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 in the current tenant: DBA_VIEWS
Query views owned by the current user: USER_VIEWS
For more information about the syntax for creating a view, see CREATE VIEW.
