Each constant, variable, parameter, and function return value in PL has a data type that defines the storage format, usage restrictions, valid value range, and allowed operations.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support this feature.
OceanBase Database provides a variety of predefined data types for PL, and also allows users to define their own data types.
The predefined data types in PL include:
SQL data types
Boolean
Cursor pointer
User-defined types
PLS_INTEGERandBINARY_INTEGERNotice
BOOLEAN,RECORD,REF CURSOR, and some predefined subtypes are PL-specific data types.- PL-specific data types cannot be used in standalone subprograms at the schema level. To use these types, you must place the subprogram inside a package.
In addition, OceanBase Database supports two JSON data types in PL statements: JSON_OBJECT_T and JSON_ELEMENT_T.
