Note
This view is available starting with V2.2.30.
Purpose
This view lists the user-defined types owned by the current user.
Applicability
This view is applicable only to OceanBase Database in Oracle mode.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| TYPE_NAME | VARCHAR2(64) | NO | The name of the type. |
| TYPE_OID | NUMBER(38) | NO | The OID of the type. |
| TYPECODE | VARCHAR2(10) | NO | The type of the object, such as OBJECT and COLL. |
| ATTRIBUTES | NUMBER(38) | NO | The number of attributes in the type. |
| METHODS | NUMBER(38) | NO | The number of methods in the type. |
| PREDEFINED | CHAR(2) | NO | Indicates whether the type is a system-defined type. |
| INCOMPLETE | CHAR(2) | NO | Indicates whether the type is incomplete. Only the name is specified, and no methods or attributes are defined. |
| FINAL | CHAR(3) | NO | Indicates whether the type cannot be inherited. |
| INSTANTIABLE | CHAR(3) | NO | Indicates whether the type can be instantiated. |
| SUPERTYPE_OWNER | VARCHAR2(30) | NO | The owner of the parent type. |
| SUPERTYPE_NAME | VARCHAR2(30) | NO | The name of the parent type. |
| LOCAL_ATTRIBUTES | NUMBER(38) | NO | The number of local attributes. |
| LOCAL_METHODS | NUMBER(38) | NO | The number of local methods. |
| TYPEID | NUMBER(38) | YES | This column is not supported. The value is NULL by default. |
Sample query
Query the user-defined types owned by the current user.
obclient [SYS]> SELECT * FROM SYS.USER_TYPES;
The query result is as follows:
+---------------+----------+------------+------------+---------+------------+------------+-------+--------------+-----------------+----------------+------------------+---------------+--------+
| TYPE_NAME | TYPE_OID | TYPECODE | ATTRIBUTES | METHODS | PREDEFINED | INCOMPLETE | FINAL | INSTANTIABLE | SUPERTYPE_OWNER | SUPERTYPE_NAME | LOCAL_ATTRIBUTES | LOCAL_METHODS | TYPEID |
+---------------+----------+------------+------------+---------+------------+------------+-------+--------------+-----------------+----------------+------------------+---------------+--------+
| PROJECT_LIST | 500105 | COLLECTION | 0 | 0 | NO | NO | YES | YES | NULL | NULL | NULL | NULL | 500105 |
| PROJECT_ARRAY | 500106 | COLLECTION | 0 | 0 | NO | NO | YES | YES | NULL | NULL | NULL | NULL | 500106 |
| PROJECT_OBJ | 500107 | OBJECT | 2 | 0 | NO | NO | YES | YES | NULL | NULL | NULL | NULL | 500107 |
+---------------+----------+------------+------------+---------+------------+------------+-------+--------------+-----------------+----------------+------------------+---------------+--------+
3 rows in set