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.5

    Download PDF

    OceanBase logo

    The Unified Distributed Database for the AI Era.

    Follow Us
    Products
    OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
    Resources
    DocsBlogLive DemosTraining & CertificationTicket
    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.5
    iconOceanBase Database
    SQL - V 4.2.5
    SQL
    KV
    • V 4.6.0
    • 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

    Diagnostic rule expression

    Last Updated:2026-04-27 03:14:13  Updated
    share
    What is on this page
    Data types
    Object computing
    Aggregate operation
    Relational operation
    Boolean operation
    Other operations

    folded

    share

    You can modify the diagnostic rule expression. The following tables describe the syntax of the diagnostic rule expression of SQL Diagnoser.

    Data types

    Type
    Description
    Numeric For example, 1, 1.1, and -2.3.
    String For example, 'a' and "abc".
    Boolean For example, true and false. The value is case-insensitive.
    Context variable The class attribute, which is used to fetch object attributes from the context. A dollar sign ($) must be prefixed to each attribute, such as $elapsedTime.
    The value is case-sensitive.

    Object computing

    Type
    Description
    Attribute access Specifies to access an attribute of an object. For example, $a.b specifies to access the b attribute of a in the context.
    Method access Specifies to access a method of an object. Method access can be used together with attribute access. For example, $a.f1() specifies to access the f1 method of a in the context.
    Method access is not available for use now.

    Aggregate operation

    Type
    Description
    COUNT, AVG, STD, VAR, MIN, MAX, SUM, and DISTINCT Specifies to perform operations on sets, which is the same as that in SQL.
    Set projection Specifies to extract an attribute of each element in a set and form a new set, similar to projected columns in SQL. For example, if $tableList in $tableList.tableName is a set, the tableName attribute is extracted from each element to form a new set.
    The value is case-insensitive.

    Relational operation

    Type
    Description
    !=/<>, =/==, <=, <, >=, and > The same as that in SQL.
    IN The same as that in SQL. It is used to determine whether an element exists in a set.
    The value is case-insensitive.

    Boolean operation

    Type
    Description
    AND, OR, and NOT The same as that in SQL. The value is case-insensitive.

    Other operations

    Type
    Description
    ISNULL, NOTNULL, NOTEMPTY, and ISEMPTY ISNULL and NOTNULL are used to determine whether an object exists. NOTEMPTY and ISEMPTY are used to determine whether a set is empty.
    The value is case-insensitive.

    Previous topic

    Built-in diagnostic items
    Last

    Next topic

    APIs
    Next
    What is on this page
    Data types
    Object computing
    Aggregate operation
    Relational operation
    Boolean operation
    Other operations