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

    Download PDF

    OceanBase logo

    The Unified Distributed Database for the AI Era.

    Follow Us
    Products
    OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
    Resources
    DocsBlogWhite PaperLive 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.6.0
    iconOceanBase Database
    SQL - V 4.6.0
    Databases
    • OceanBase Database
    • OceanBase Cloud
    • OceanBase Tugraph
    • Interactive Tutorials
    • OceanBase Best Practices
    Tools
    • OceanBase Cloud Platform
    • OceanBase Migration Service
    • OceanBase Developer Center
    • OceanBase Migration Assessment
    • OceanBase Admin Tool
    • OceanBase Loader and Dumper
    • OceanBase Deployer
    • Kubernetes operator for OceanBase
    • OceanBase Diagnostic Tool
    • OceanBase Binlog Service
    Connectors and Middleware
    • OceanBase Database Proxy
    • Embedded SQL in C for OceanBase
    • OceanBase Call Interface
    • OceanBase Connector/C
    • OceanBase Connector/J
    • OceanBase Connector/ODBC
    • OceanBase Connector/NET
    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

    Schema object names

    Last Updated:2026-05-07 11:26:25  Updated
    Share
    What is on this page
    Identifier quoting
    Identifier qualifiers

    folded

    Share

    Schema objects include databases, tables, indexes, columns, aliases, views, stored procedures, partitions, and tablespaces. These are collectively referred to as identifiers.

    Identifier quoting

    The quoting character for identifiers is the backtick (`). Identifiers can be quoted or unquoted. If an identifier contains special characters or is a reserved word, it must be quoted.

    obclient> SELECT * FROM `table` WHERE `table`.id > 10;
    

    Internally, identifiers are converted and stored as Unicode (UTF-8). Identifiers can contain the following characters:

    • Characters allowed in unquoted identifiers:

      • ASCII: [0-9,a-z,A-Z$_] (ASCII: [0-basic Latin, digits 0-9, dollar, underscore])

      • Extended characters: U+0080 .. U+FFFF

    • Characters allowed in quoted identifiers include the entire Unicode BMP, except for U+0000:

      • ASCII: U+0001 .. U+007F

      • Extended characters: U+0080 .. U+FFFF

    • ASCII NUL (U+0000) and supplementary characters (U+10000 and above) are not allowed in quoted or unquoted identifiers.

    • Identifiers can start with a number, unless they are quoted, in which case they cannot consist solely of numbers.

    • Database, table, and column names cannot end with a space character.

    If an identifier is quoted, the quoting character can be included in the identifier. If the character included in the identifier is the same as the character used to quote the identifier, it must be quoted twice.

    For example, the following statement creates a table named a"b with a column named c`d:

    obclient> CREATE TABLE `a"b` (`c``d` INT);
    Query OK, 0 rows affected
    

    When referencing an alias elsewhere in a statement, you must use identifier quoting, otherwise it will be treated as a string literal.

    obclient> SELECT 1 AS `one`, 2 AS 'two';
    +-----+-----+
    | one | two |
    +-----+-----+
    |   1 |   2 |
    +-----+-----+
    1 row in set
    

    Identifier qualifiers

    Object names can be qualified or unqualified (omitted). A qualified name must include at least one qualifier.

    For example, the following statement creates a table named t1:

    obclient> CREATE TABLE t1 (c INT);
    Query OK, 0 rows affected
    

    Since t1 does not include a qualifier for specifying the database, the statement creates the table in the default database. If no default database exists, an error occurs.

    For example, the following statement creates a table named t1 in the ob1 database:

    obclient> CREATE TABLE ob1.t1 (c INT);
    Query OK, 0 rows affected
    

    Since ob1.t1 includes the database qualifier ob1, the statement creates the t1 table in the ob1 database. If no default database exists, you must specify the qualifier. If a default database exists, you can specify a non-default database using the qualifier.

    Qualifiers have the following characteristics:

    • An unqualified name consists of a single identifier. A qualified name consists of multiple identifiers.

    • Identifiers and qualifiers are separated by a period (.) character.

    • A qualifier is an independent token, and there can be space between the identifier and the qualifier. For example, tbl_name.col_name and tbl_name . col_name are equivalent.

    • When both identifiers and qualifiers are present, they must be quoted separately. For example, my-table`.`my-column is correct, while ```my-table.my-column` `` is incorrect.

    • Reserved words following a period (.) in a qualified name must be identifiers.

    • The syntax .tbl_name refers to the table tbl_name in the default database.

    The qualifiers allowed for object names depend on the object type, as follows:

    • Database names are fully qualified and do not have qualifiers:

      CREATE DATABASE obdb1;
      
    • Table, view, or stored procedure names can be specified with a database qualifier. Examples of unqualified and qualified names in a CREATE statement are as follows:

      CREATE TABLE mytable ...;
      CREATE VIEW myview ...;
      
      CREATE TABLE obdb.mytable ...;
      CREATE VIEW obdb.myview ...;
      
    • Column names can be specified with multiple qualifiers. The following table shows examples.

      Column reference
      Meaning
      col_name Any column named col_name in any table used in the statement.
      tbl_name.col_name The column col_name in the table tbl_name in the default database.
      db_name.tbl_name.col_name The column col_name in the table tbl_name in the db_name database.

      To retrieve data from the same table in different databases in the same statement, you must qualify the table. If you reference columns in these tables, only column names that exist in both tables need to be qualified.

    Previous topic

    NULL values
    Last

    Next topic

    Overview
    Next
    What is on this page
    Identifier quoting
    Identifier qualifiers