Purpose
Displays the views that the current user owns. The USER_VIEWS view displays the views owned by the current user.
Applicability
This view applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition provides only the MySQL mode.
Columns
| VIEW_NAME | VARCHAR2(128) | YES | The name of the index. | | Column | Type | Nullable? | Description | | TEXT | CLOB | NO | View text | | TEXT_VC | VARCHAR2(4000) | NO | This field is not supported, and its default value is NULL. | | TYPE_TEXT_LENGTH | NUMBER | NO | This field is currently unsupported, and its default value is NULL. | | TYPE_TEXT | VARCHAR2(4000) | NO | This field is not supported now and is null by default. | | OID_TEXT_LENGTH | NUMBER | NO | This field is currently not supported, and it defaults to NULL. | | OID_TEXT | VARCHAR2(4000) | NO | This field is not supported and has a default value of NULL. | | VIEW_TYPE_OWNER | VARCHAR2(128) | NO | This field is not supported and is automatically NULL. | | TEXT | VARCHAR2(4000) | NO | The view text. | | SUPERVIEW_NAME | VARCHAR2(30) | NO | The field is not supported yet. This field is set to NULL by default. | | EDITIONING_VIEW | VARCHAR2(1) | NO | Currently, this field is not supported. This field is NULL by default. | | READ_ONLY | VARCHAR2(1) | NO | This field is not supported and is NULL by default. | | CONTAINER_DATA | VARCHAR2(1) | NO | This field is not supported currently and is NULL by default | | BEQUEATH | VARCHAR2(12) | NO | The field is temporarily unsupported and default value is NULL. | | ORIGIN_CON_ID | NUMBER | NO | The origin connection ID. Currently, this field is not supported. Its value is NULL by default. | | DEFAULT_COLLATION | VARCHAR2(100) | NO | This field is not supported and is set to NULL by default. | | CONTAINERS_DEFAULT | VARCHAR2(3) | NO | This field is not supported, and its default value is NULL. | | CONTAINER_MAP | VARCHAR2(2) | NO | This field is not supported and defaults to NULL. | | EXTENDED_DATA_LINK | VARCHAR2(3) | NO | This field is temporarily not supported and is currently set to NULL by default. | | EXTENDED_DATA_LINK_MAP | VARCHAR2(3) | NO | This field is not supported and is currently set to NULL by default. | | HAS_SENSITIVE_COLUMN | VARCHAR2(3) | NO | This field is not supported and is set to NULL by default. | | ADMIT_NULL | VARCHAR2(3) | NO | This field is not currently supported. The default value of the field is NULL. | | PDB_LOCAL_ONLY | VARCHAR2(3) | NO | This field is temporarily not supported and its default value is NULL | | SUPERVIEW_NAME | VARCHAR2(30) | NO | At present, this column is not supported and its value is NULL by default. |
Sample query
Get information about the view VIEW1 owned by the current user.
obclient [SYS]> SELECT VIEW_NAME, TEXT_LENGTH, TEXT FROM SYS.USER_VIEWS WHERE VIEW_NAME='VIEW1';
The query result is as follows:
+-----------+-------------+-----------------------------+
| VIEW_NAME | TEXT_LENGTH | TEXT |
+-----------+-------------+-----------------------------+
| VIEW1 | 27 | SELECT col1, col2 FROM tbl1 |
+-----------+-------------+-----------------------------+
1 row in set
Related views and documents
View all views that can be accessed by the current user: ALL_VIEWS
View all views under the current tenant: DBA_VIEWS
For more information about the syntax of the CREATE VIEW statement, see CREATE VIEW.
| EDITIONING_VIEW | VARCHAR2(1) | NO | At present, this column is not supported and its value is NULL by default. | | READ_ONLY | VARCHAR2(1) | NO | At present, this column is not supported and its value is NULL by default. |