OceanBase logo

OceanBase

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

Product Overview
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

OceanBase

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

Product Overview
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.2.1

    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.2.1
    iconOceanBase Database
    SQL - V 4.2.1
    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

    INFORMATION_SCHEMA ROUTINES

    Last Updated:2026-04-28 09:23:26  Updated
    share
    What is on this page
    share

    The INFORMATION_SCHEMA ROUTINES dictionary view provides information about stored routines such as stored procedures and storage functions, which do not include built-in (local) functions or loadable functions. The following table describes the fields in the INFORMATION_SCHEMA ROUTINES dictionary view.

    Field Description
    SPECIFIC_NAME The name of the stored routine.
    ROUTINE_CATALOG The name of the catalog to which the stored routine belongs. The value of this field is always def. At present, this field is not used.
    ROUTINE_SCHEMA The name of the schema (or database) to which the stored routine belongs.
    ROUTINE_NAME The name of the stored routine, which is the same as the SPECIFIC_NAME.
    ROUTINE_TYPE The type of the stored routine. For a stored procedure, the value is PROCEDURE. For a storage function, the value is FUNCTION.
    DATA_TYPE The data type of the return value of the routine if the routine is a stored function. If the routine is a stored procedure, this field is empty. The value of DATA_TYPE contains only the type name, without other information. The value of DTD_IDENTIFIER contains the data type name and other information, such as the precision or length. At present, this field is not used.
    CHARACTER_MAXIMUM_LENGTH The maximum character length for string return values of the routine if the routine is a stored function. If the routine is a stored procedure, the value of this field is NULL. At present, this field is not used.
    CHARACTER_OCTET_LENGTH The maximum length for string return values of the routine if the routine is a stored function, in bytes. If the routine is a stored procedure, the value of this field is NULL. At present, this field is not used.
    NUMERIC_PRECISION The numeric precision of the return value of the stored function. If the routine is a stored procedure, the value of this field is NULL. At present, this field is not used.
    NUMERIC_SCALE The numeric scale of the return value of the stored function. If the routine is a stored procedure, the value of this field is NULL. At present, this field is not used.
    DATETIME_PRECISION The fractional seconds precision of the temporal return value of the routine if the routine is a stored function. If the routine is a stored procedure, the value of this field is NULL. At present, this field is not used.
    CHARACTER_SET_NAME The character set name for string return values of the routine if the routine is a stored function. If the routine is a stored procedure, the value of this field is NULL. At present, this field is not used.
    COLLATION_NAME The collation name for string return values of the routine if the routine is a stored function. If the routine is a stored procedure, the value of this field is NULL. At present, this field is not used.
    DTD_IDENTIFIER The data type of the return value of the routine if the routine is a stored function. If the routine is a stored procedure, this field is empty. The value of DATA_TYPE contains only the type name, without other information. The value of DTD_IDENTIFIER contains the data type name and other information, such as the precision or length.
    ROUTINE_BODY The language used for the routine definition. The value of this field is always SQL.
    ROUTINE_DEFINITION The text of the SQL statement executed by the routine.
    EXTERNAL_NAME The value of this field is always NULL.
    EXTERNAL_LANGUAGE The language of the stored routine. At present, this field is not used.
    PARAMETER_STYLE The value of this field is always SQL.
    IS_DETERMINISTIC Indicates whether the stored routine is defined with the DETERMINISTIC characteristic. Valid value: YES or NO. At present, this field is not used.
    SQL_DATA_ACCESS The data access characteristic for the stored routine. The value can be CONTAINS SQL, NO SQL, READS SQL DATA, or MODIFIES SQL DATA.
    SQL_PATH The value of this field is always NULL.
    SECURITY_TYPE The SQL SECURITY characteristic of the routine. The value can be DEFINER or INVOKER. At present, this field is not used.
    CREATED The date and time when the routine was created. The value type is TIMESTAMP.
    LAST_ALTERED The date and time when the routine was last modified. If the routine has not been modified since its creation, the value of this field is the same as the value of CREATED.
    SQL_MODE The SQL mode in effect when the routine was created or modified and under which the routine executes.
    ROUTINE_COMMENT The comment text of the routine, if any. The value can be empty.
    DEFINER The account named in the DEFINER clause, in the format of 'user_name'@'host_name'. It is often the user who created the routine.
    CHARACTER_SET_CLIENT The value of the CHARACTER_SET_CLIENT system variable in the current session when the stored routine was created or modified.
    COLLATION_CONNECTION The value of the COLLATION_CONNECTION system variable in the current session when the stored routine was created or modified.
    DATABASE_COLLATION The value of the DATABASE_COLLATION system variable in the current session when the stored routine was created or modified.

    Here is an example:

    obclient> SELECT * FROM INFORMATION_SCHEMA.ROUTINES
           WHERE ROUTINE_SCHEMA='test' AND ROUTINE_NAME='p1'\G
    *************************** 1. row ***************************
                 SPECIFIC_NAME: p1
               ROUTINE_CATALOG: def
                ROUTINE_SCHEMA: test
                  ROUTINE_NAME: p1
                  ROUTINE_TYPE: PROCEDURE
                     DATA_TYPE:  
      CHARACTER_MAXIMUM_LENGTH: NULL
        CHARACTER_OCTET_LENGTH: NULL
             NUMERIC_PRECISION: NULL
                 NUMERIC_SCALE: NULL
            DATETIME_PRECISION: NULL
            CHARACTER_SET_NAME: NULL
                COLLATION_NAME: NULL
                DTD_IDENTIFIER: NULL
                  ROUTINE_BODY: SQL
            ROUTINE_DEFINITION: BEGIN
                                # Set value of OUT parameter
                                SELECT VERSION() INTO ver_param;
                                # Increment value of INOUT parameter
                                SET incr_param = incr_param + 1;
                                END
                 EXTERNAL_NAME: NULL
             EXTERNAL_LANGUAGE: NULL
               PARAMETER_STYLE: SQL
              IS_DETERMINISTIC: NO
               SQL_DATA_ACCESS: CONTAINS_SQL
                      SQL_PATH: NULL
                 SECURITY_TYPE: DEFINER
                       CREATED: 2022-05-18 18:07:51.994639
                  LAST_ALTERED: 2022-05-26 18:07:51.994639
                      SQL_MODE: STRICT_ALL_TABLES,NO_ZERO_IN_DATE
               ROUTINE_COMMENT:
                       DEFINER: 'root'@'%'
          CHARACTER_SET_CLIENT: utf8mb4
          COLLATION_CONNECTION: utf8mb4_general_ci
            DATABASE_COLLATION: utf8mb4_general_ci
    

    Previous topic

    INFORMATION_SCHEMA PARAMETERS
    Last

    Next topic

    INFORMATION_SCHEMA TRIGGERS
    Next