Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
On this page

Show all

Mapping for JDBC Data Types

Updated on 2024-06-03 GMT+08:00

The relationships among data types, Java variable types, and JDBC type indexes are as follows (A: Oracle-compatible; B: MySQL-compatible; M: M-compatible).

Compatibility Mode

Gauss Kernel Data Type

Java Variable Type

JDBC Type Index

A/B

oid

java.lang.Long

java.sql.Types.BIGINT

A/B/M

numeric

java.math.BigDecimal

java.sql.Types.NUMERIC

A/B/M

tinyint

java.lang.Integer

java.sql.Types.TINYINT

A/B/M

smallint

java.lang.Integer

java.sql.Types.SMALLINT

A/B/M

bigint

java.lang.Long

java.sql.Types.BIGINT

A/B/M

float4

java.lang.Float

java.sql.Types.REAL

A/B/M

float8

java.lang.Double

java.sql.Types.DOUBLE

A/B/M

char

java.lang.String

java.sql.Types.CHAR

A/B

character

java.lang.String

java.sql.Types.CHAR

A/B

bpchar

java.lang.String

java.sql.Types.CHAR

A/B

character varying

java.lang.String

java.sql.Types.VARCHAR

A/B/M

varchar

java.lang.String

java.sql.Types.VARCHAR

A/B/M

text

java.lang.String

java.sql.Types.VARCHAR

A/B

name

java.lang.String

java.sql.Types.VARCHAR

A/B

bytea

byte[]

java.sql.Types.BINARY

A/B/M

blob

java.sql.Blob

java.sql.Types.BLOB

A/B

clob

java.sql.Clob

java.sql.Types.CLOB

A/B

boolean

java.lang.Boolean

java.sql.Types.BIT

B/M

date

java.sql.Date

java.sql.Types.DATE

A/B/M

time

java.sql.Time

java.sql.Types.TIME

A/B

timetz

java.sql.Time

java.sql.Types.TIME

A/B/M

timestamp

java.sql.Timestamp

java.sql.Types.TIMESTAMP

A/B

smalldatetime

java.sql.Timestamp

java.sql.Types.TIMESTAMP

A/B

timestamptz

java.sql.Timestamp

java.sql.Types.TIMESTAMP

A/B

refcursor

java.sql.ResultSet

java.sql.Types.REF_CURSOR

java.sql.Types.OTHER

-10

M

boolean

java.lang.Integer

java.sql.Types.TINYINT

M

tinyblob

java.sql.Blob

java.sql.Types.BLOB

M

mediumblob

java.sql.Blob

java.sql.Types.BLOB

M

longblob

java.sql.Blob

java.sql.Types.BLOB

M

tinytext

java.lang.String

java.sql.Types.VARCHAR

M

mediumtext

java.lang.String

java.sql.Types.VARCHAR

M

longtext

java.lang.String

java.sql.Types.VARCHAR

M

binary

byte[]

java.sql.Types.BINARY

M

varbinary

byte[]

java.sql.Types.BINARY

M

tinyint unsigned

java.lang.Integer

java.sql.Types.INTEGER

M

smallint unsigned

java.lang.Integer

java.sql.Types.INTEGER

M

mediumint unsigned

java.lang.Integer

java.sql.Types.INTEGER

M

integer unsigned

java.lang.Long

java.sql.Types.BIGINT

M

bigint unsigned

java.math.BigInteger

java.sql.Types.BIGINT

M

mediumint

java.lang.Integer

java.sql.Types.INTEGER

M

integer

java.lang.Integer

java.sql.Types.INTEGER

M

decimal

java.math.BigDecimal

java.sql.Types.NUMERIC

M

dec

java.math.BigDecimal

java.sql.Types.NUMERIC

M

real

java.lang.Double

java.sql.Types.DOUBLE

M

datetime

java.sql.Timestamp

java.sql.Types.TIMESTAMP

M

year

java.sql.Date

java.sql.Types.DATE

M

bit

byte[]

java.sql.Types.BIT

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback