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 Migration Service

V4.2.0Community 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 & 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 Migration Service
    3. V4.2.0
    iconOceanBase Migration Service
    V 4.2.0Community Edition
    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
    Enterprise Edition
    • V 4.3.2
    • V 4.3.1
    • V 4.3.0
    • V 4.2.5
    • V 4.2.4
    • V 4.2.3
    • V 4.0.2
    • V 3.4.0
    Community Edition
    • V 4.2.13
    • V 4.2.12
    • V 4.2.11
    • V 4.2.10
    • V 4.2.9
    • V 4.2.8
    • V 4.2.7
    • V 4.2.6
    • V 4.2.5
    • V 4.2.4
    • V 4.2.3
    • V 4.2.1
    • V 4.2.0
    • V 4.0.0
    • V 3.3.1

    Column types that are supported to create indexes or constraints

    Last Updated:2026-04-14 07:41:23  Updated
    Share
    What is on this page
    Supported types for a PRIMARY KEY column
    Supported types for a UNIQUE KEY column
    Supported types for a KEY column
    Supported types for a FOREIGN KEY column
    Supported types for a FULLTEXT-indexed column

    folded

    Share

    This topic describes the column types that are supported for creating different constraints in a MySQL database and a MySQL tenant of OceanBase Database.

    Supported types for a PRIMARY KEY column

    The following table describes the column types that you can use to create a PRIMARY KEY column by executing the CREATE TABLE DDL statement in a MySQL database and a MySQL tenant of OceanBase Database.

    Column type in a MySQL database
    Supported?
    Column type in a MySQL tenant of OceanBase Database
    Supported?
    INT Yes INTEGER Yes
    TINYINT Yes TINYINT Yes
    SMALLINT Yes SMALLINT Yes
    MEDIUMINT Yes MEDIUMINT Yes
    BIGINT Yes BIGINT Yes
    BOOL Yes BOOLEAN Yes
    DECIMAL Yes DECIMAL Yes
    NUMERIC Yes NUMERIC Yes
    REAL Yes FLOAT Yes
    DOUBLE Yes DOUBLE Yes
    FLOAT Yes FLOAT Yes
    BIT Yes BIT Yes
    CHAR Yes CHAR Yes
    NCHAR Yes CHAR Yes
    VARCHAR Yes VARCHAR Yes
    BINARY Yes BINARY Yes
    VARBINARY Yes VARBINARY Yes
    LONG VARBINARY Yes (You must specify the column length.) BLOB No
    YEAR Yes YEAR Yes
    DATE Yes DATE Yes
    TIME Yes TIME Yes
    TIMESTAMP Yes TIMESTAMP Yes
    DATETIME Yes DATETIME Yes
    TINYBLOB Yes (You must specify the column length.) TINYBLOB No
    MEDIUMBLOB Yes (You must specify the column length.) MEDIUMBLOB No
    BLOB Yes (You must specify the column length.) BLOB No
    LONGBLOB Yes (You must specify the column length.) LONGBLOB No
    TINYTEXT Yes (You must specify the column length.) TINYTEXT No
    MEDIUMTEXT Yes (You must specify the column length.) MEDIUMTEXT No
    TEXT Yes (You must specify the column length.) TEXT No
    LONGTEXT Yes (You must specify the column length.) LONGTEXT No
    ENUM Yes ENUM Yes
    SET Yes SET Yes
    JSON Yes JSON No

    Supported types for a UNIQUE KEY column

    The column types that you can use to create a UNIQUE KEY column by executing the CREATE TABLE DDL statement in a MySQL database and a MySQL tenant of OceanBase Database are the same as those that you can use to create a PRIMARY KEY column.

    Supported types for a KEY column

    The column types that you can use to create a KEY column by executing the CREATE TABLE DDL statement in a MySQL database and a MySQL tenant of OceanBase Database are the same as those that you can use to create a PRIMARY KEY column.

    Supported types for a FOREIGN KEY column

    The column types that you can use to create a FOREIGN KEY column by executing the CREATE TABLE DDL statement in a MySQL database and a MySQL tenant of OceanBase Database are the same as those that you can use to create a PRIMARY KEY column.

    Supported types for a FULLTEXT-indexed column

    The following table describes the column types that you can use to create a FULLTEXT indexed column by executing the CREATE TABLE DDL statement in a MySQL database and a MySQL tenant of OceanBase Database.

    Column type in a MySQL database
    Supported?
    Column type in a MySQL tenant of OceanBase Database
    Supported?
    INT No INTEGER No
    TINYINT No TINYINT No
    SMALLINT No SMALLINT No
    MEDIUMINT No MEDIUMINT No
    BIGINT No BIGINT No
    BOOL No BOOLEAN No
    DECIMAL No DECIMAL No
    NUMERIC No NUMERIC No
    REAL No FLOAT No
    DOUBLE No DOUBLE No
    FLOAT No FLOAT No
    BIT No BIT No
    CHAR Yes CHAR Yes
    NCHAR Yes CHAR Yes
    VARCHAR Yes VARCHAR Yes
    BINARY No BINARY Yes
    VARBINARY No VARBINARY Yes
    LONG VARBINARY No BLOB No
    YEAR No YEAR No
    DATE No DATE No
    TIME No TIME No
    TIMESTAMP No TIMESTAMP No
    DATETIME No DATETIME No
    TINYBLOB No TINYBLOB No
    MEDIUMBLOB No MEDIUMBLOB No
    BLOB No BLOB No
    LONGBLOB No LONGBLOB No
    TINYTEXT Yes TINYTEXT Yes
    MEDIUMTEXT Yes MEDIUMTEXT Yes
    TEXT Yes TEXT Yes
    LONGTEXT Yes LONGTEXT Yes
    ENUM No ENUM No
    SET No SET No
    JSON Yes JSON No

    Previous topic

    Incompatibilities of CREATE TABLE
    Last

    Next topic

    Incompatibilities of ALTER TABLE
    Next
    What is on this page
    Supported types for a PRIMARY KEY column
    Supported types for a UNIQUE KEY column
    Supported types for a KEY column
    Supported types for a FOREIGN KEY column
    Supported types for a FULLTEXT-indexed column