Purpose
List the user-defined types owned by the current user.
Applicability
This view is available only in Oracle mode of OceanBase Database.
Columns
| Column | Type | Nullable | Description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| TYPE_NAME | VARCHAR2(64) | NO | Type | ||||||||||
| TYPE_OID | NUMBER(38) | NO | Object ID | ||||||||||
| TYPECODE | VARCHAR2(10) | NO | The type of the object, for example, OBJECT or COLL. | ||||||||||
| ATTRIBUTES | NUMBER(38) | NO | Number of attributes in the type | ||||||||||
| METHODS | NUMBER(38) | NO | The number of methods included in the type | ||||||||||
| PREDEFINED | CHAR(2) | NO | Specifies whether the type is system predefined. | ||||||||||
| INCOMPLETE | CHAR(2) | NO | Specifies whether a type is incomplete, which means only the name is specified without methods or attributes. | ||||||||||
| FINAL | CHAR(3) | NO | Whether the field can be inherited | ||||||||||
| INSTANTIABLE | CHAR(3) | NO | Whether the table is instantiable. | ||||||||||
| Column | Type | Nullable | Description | --- | --- | --- | --- | SUPERTYPE_OWNER | VARCHAR2(30) | NO | The owner of the supertype. | ||
| SUPERTYPE_NAME | VARCHAR2(30) | NO | The name of the parent type. | ||||||||||
| LOCAL_ATTRIBUTES | NUMBER(38) | NO | Number of local attributes | ||||||||||
| LOCAL_METHODS | NUMBER(38) | NO | The number of local methods. | ||||||||||
| TYPEID | NUMBER(38) | YES | Column |
Sample query
Display the list of user-defined types for 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