OceanBase logo

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Resources

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS

OceanBase Cloud

OceanBase Database

Tools

Connectors and Middleware

QUICK START

OceanBase Cloud

OceanBase Database

BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Company

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

International - English
中国站 - 简体中文
日本 - 日本語
Sign In
Start on Cloud

A unified distributed database ready for your transactional, analytical, and AI workloads.

DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS
OceanBase CloudOceanBase Database
ToolsConnectors and Middleware
QUICK START
OceanBase CloudOceanBase Database
BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

Start on Cloud
编组
All Products
    • Databases
    • iconOceanBase Database
    • iconOceanBase Cloud
    • iconOceanBase Tugraph
    • iconInteractive Tutorials
    • iconOceanBase Best Practices
    • Tools
    • iconOceanBase Cloud Platform
    • iconOceanBase Migration Service
    • iconOceanBase Developer Center
    • iconOceanBase Migration Assessment
    • iconOceanBase Admin Tool
    • iconOceanBase Loader and Dumper
    • iconOceanBase Deployer
    • iconKubernetes operator for OceanBase
    • iconOceanBase Diagnostic Tool
    • iconOceanBase Binlog Service
    • Connectors and Middleware
    • iconOceanBase Database Proxy
    • iconEmbedded SQL in C for OceanBase
    • iconOceanBase Call Interface
    • iconOceanBase Connector/C
    • iconOceanBase Connector/J
    • iconOceanBase Connector/ODBC
    • iconOceanBase Connector/NET
icon

OceanBase Database

SQL - V4.4.2

    Download PDF

    OceanBase logo

    The Unified Distributed Database for the AI Era.

    Follow Us
    Products
    OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
    Resources
    DocsBlogLive DemosTraining & Certification
    Company
    About OceanBaseTrust CenterLegalPartnerContact Us
    Follow Us

    © OceanBase 2026. All rights reserved

    Cloud Service AgreementPrivacy PolicySecurity
    Contact Us
    Document Feedback
    1. Documentation Center
    2. OceanBase Database
    3. SQL
    4. V4.4.2
    iconOceanBase Database
    SQL - V 4.4.2
    SQL
    KV
    • V 4.4.2
    • V 4.3.5
    • V 4.3.3
    • V 4.3.1
    • V 4.3.0
    • V 4.2.5
    • V 4.2.2
    • V 4.2.1
    • V 4.2.0
    • V 4.1.0
    • V 4.0.0
    • V 3.1.4 and earlier

    PL environment definitions in the STANDARD package

    Last Updated:2026-04-14 03:51:52  Updated
    share
    What is on this page
    Predefined data types
    Predefined exceptions

    folded

    share

    The STANDARD package defines the PL environment. The package header declares public types, variables, exceptions, and subprograms that are available for use in PL programs.

    Applicability

    This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition provides only MySQL-compatible mode.

    The contents of the system package STANDARD are directly visible to applications. Users can call the package from database triggers, stored subprograms, or OceanBase Database tools without prefixing the package name.

    Note

    System functions of OceanBase Database are not registered in the STANDARD package. The STANDARD package in the current version supports only predefined data types, constants, and exceptions.

    Predefined data types

    The following table lists the predefined subtypes supported by the STANDARD package in the current version.

    Predefined Subtype Value Description
    DOUBLE PRECISION FLOAT
    DEC DECIMAL
    STRING VARCHAR2(32760)
    LONG VARCHAR2(32760)
    CHARACTER VARYING VARCHAR(32767)
    CHAR VARYING VARCHAR(32767)
    CHARACTER LARGE OBJECT CLOB
    BINARY LARGE OBJECT BLOB
    CHAR LARGE OBJECT CLOB
    TIMESTAMP_UNCONSTRAINED TIMESTAMP(9)
    TIMESTAMP_TZ_UNCONSTRAINED TIMESTAMP(9) WITH TIME ZONE
    YMINTERVAL_UNCONSTRAINED INTERVAL YEAR(9) TO MONTH
    DSINTERVAL_UNCONSTRAINED INTERVAL DAY(9) TO SECOND(9)
    TIMESTAMP_LTZ_UNCONSTRAINED TIMESTAMP(9) WITH LOCAL TIME ZONE

    The following data types are generic and are used only by the STANDARD package and some other packages. Note that generic data types are not part of the language.

    Generic Data Type Value Description
    <ADT_1> RECORD (DUMMY CHAR(1))
    <RECORD_1> RECORD (DUMMY CHAR(1))
    <TUPLE_1> RECORD (DUMMY CHAR(1))
    <VARRAY_1> VARRAY(1) OF CHAR(1)
    <V2_TABLE_1> TABLE OF CHAR(1) INDEX BY BINARY_INTEGER
    <TABLE_1> TABLE OF CHAR(1)
    <COLLECTION_1> TABLE OF CHAR(1)
    <REF_CURSOR_1> REF CURSOR
    <TYPED_TABLE> TABLE OF <ADT_1>
    <ADT_WITH_OID> <TYPED_TABLE>

    The PL compiler uses the following generic indexed table data types to instantiate array attributes.

    Generic Indexed Table Data Type Value Description
    SYS $ INT_V2TABLE An integer indexed table represented by binary_integer

    The PL compiler uses the following record types and corresponding generic indexed table data types to record exceptions that occur during the execution of FORALL bulk bind statements.

    Record Type Value Description
    SYS$BULK_ERROR_RECORD RECORD (ERROR_INDEX PLS_INTEGER,ERROR_CODE PLS_INTEGER)
    SYS$REC_V2TABLE TABLE OF CHAR(1)

    The following table lists all opaque generic data types.

    Opaque Generic Data Type Value Description
    <ASSOC_ARRAY_1> TABLE OF CHAR(1) INDEX BY VARCHAR2(1)

    Predefined exceptions

    Predefined exceptions Compilation directives
    CURSOR_ALREADY_OPEN EXCEPTION_INIT(CURSOR_ALREADY_OPEN, '-5589')
    DUP_VAL_ON_INDEX EXCEPTION_INIT(DUP_VAL_ON_INDEX, '-5024')
    TIMEOUT_ON_RESOURCE EXCEPTION_INIT(TIMEOUT_ON_RESOURCE, '-5848')
    INVALID_CURSOR EXCEPTION_INIT(INVALID_CURSOR, '-5844')
    NOT_LOGGED_ON EXCEPTION_INIT(NOT_LOGGED_ON, '-5846')
    LOGIN_DENIED EXCEPTION_INIT(LOGIN_DENIED, '-5845')
    NO_DATA_FOUND EXCEPTION_INIT(NO_DATA_FOUND, '-4026')
    ZERO_DIVIDE EXCEPTION_INIT(ZERO_DIVIDE, '-4333')
    INVALID_NUMBER EXCEPTION_INIT(INVALID_NUMBER, '-5114')
    TOO_MANY_ROWS EXCEPTION_INIT(TOO_MANY_ROWS, '-5294')
    STORAGE_ERROR EXCEPTION_INIT(STORAGE_ERROR, '-5842')
    PROGRAM_ERROR EXCEPTION_INIT(PROGRAM_ERROR, '-5840')
    VALUE_ERROR EXCEPTION_INIT(VALUE_ERROR, '-5677')
    ACCESS_INTO_NULL EXCEPTION_INIT(ACCESS_INTO_NULL, '-5837')
    COLLECTION_IS_NULL EXCEPTION_INIT(COLLECTION_IS_NULL , '-5838')
    SUBSCRIPT_OUTSIDE_LIMIT EXCEPTION_INIT(SUBSCRIPT_OUTSIDE_LIMIT,'-5843')
    SUBSCRIPT_BEYOND_COUNT EXCEPTION_INIT(SUBSCRIPT_BEYOND_COUNT ,'-5828')
    ROWTYPE_MISMATCH EXCEPTION_INIT(ROWTYPE_MISMATCH, '-5841')
    SYS_INVALID_ROWID EXCEPTION_INIT(SYS_INVALID_ROWID, '-5802')
    SELF_IS_NULL EXCEPTION_INIT(SELF_IS_NULL, '-5847')
    CASE_NOT_FOUND EXCEPTION_INIT(CASE_NOT_FOUND, '-5571')
    NO_DATA_NEEDED EXCEPTION_INIT(NO_DATA_NEEDED, '-5839')

    Previous topic

    Manage packages
    Last

    Next topic

    Overview
    Next
    What is on this page
    Predefined data types
    Predefined exceptions