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.1.0Enterprise Edition

    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.1.0
    iconOceanBase Database
    SQL - V 4.1.0Enterprise Edition
    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

    Overview

    Last Updated:2023-07-28 02:53:17  Updated
    share
    What is on this page
    General conventions
    Identifier length limits
    Maximum number of ODP connections
    Maximum number of partition replicas
    Single-table limits
    Single-column limits
    String type limits

    folded

    share

    This topic describes the general naming conventions for OceanBase Database objects.

    During database development, database objects should be named in a standardized manner to make code more readable and easier to understand and inherit. This topic provides developers with suggestions on database object naming conventions.

    General conventions

    The following sections describe the general conventions and precautions for naming objects.

    • Use consistent character sets for databases and tables, and use consistent character sets for all tables. We recommend that you use the UTF8MB4 character set for all. We do not recommend that you use custom character sets at the table level.

    • Use unified and standardized naming conventions.

    • Use full English words.

    • Use standard abbreviations.

    • Do not use Chinese characters.

    • Do not use both Pinyin and English in the same object name.

    • Do not use meaningless strings consisting purely of digits, meaningless letters, underscores (_), or special characters.

    • Do not use spaces between the characters in an object name.

    • Do not use system reserved words and keywords.

    • Do not use object names that conflict with database systems or common access methods.

    • Do not use pure Pinyin in an object name.

    Identifier length limits

    • MySQL mode

      Item Maximum length
      Cluster name 128 bytes
      Tenant name 64 bytes
      Username 64 bytes
      Database name 128 bytes
      Table name 64 characters
      Column name 128 bytes
      Index name 64 bytes
      View name 64 bytes
      Alias 255 bytes
      Partition name 64 bytes
    • Oracle mode

      Type Maximum length
      Cluster name 128 bytes
      Tenant name 64 bytes
      Username 64 bytes
      Table name 128 bytes
      Column name 128 bytes
      Index name 128 bytes
      View name 128 bytes
      Alias 255 bytes
      Object name 128 bytes
      Partition name 64 bytes

    Maximum number of ODP connections

    Type Upper limit
    Number of connections per ODP You can specify the client_max_connections parameter of an ODP to specify the maximum number of connections of the ODP. The default value is 8192.
    Note
    You can increase the number of ODP nodes or the value of the client_max_connections parameter to increase the maximum number of connections for a cluster.

    Maximum number of partition replicas

    Type Upper limit
    Number of partition replicas per OBServer node No upper limit.
    Note
    The number of partition replicas for each OBServer node can be estimated based on the size of the memory for the tenant. About 20,000 tablets are supported by 1 GB of memory.

    Single-table limits

    Type Upper limit
    Row length 1.5 MB
    Number of columns 4,096
    Number of indexes 128
    Total number of index columns 512
    Index length 1.5 MB
    Total number of primary key columns 64
    Primary key length 16 KB
    Number of partitions
    • Oracle mode: 65,536
    • MySQL mode: 8,192

    Single-column limits

    Type Upper limit
    Length of an index column 262,143 bytes

    String type limits

    • MySQL mode

      Type Maximum length
      CHAR 256 bytes
      VARCHAR 1,048,576 bytes
      BINARY 256 bytes
      VARBINARY 1,048,576 bytes
      BLOB 536,870,911 bytes
      TEXT 536,870,911 bytes
    • Oracle mode

      Type Maximum length
      CHAR 2,000 bytes
      VARCHAR 32,767 bytes
      VARCHAR2 32,767 bytes
      NCHAR 2,000 bytes
      NVARCHAR2 32,767 bytes

    Previous topic

    Reserved PL keywords
    Last

    Next topic

    Tenant naming conventions
    Next
    What is on this page
    General conventions
    Identifier length limits
    Maximum number of ODP connections
    Maximum number of partition replicas
    Single-table limits
    Single-column limits
    String type limits