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 Connector/J

V2.2.7

  • What's New
  • What is OceanBase Connector J?
    • Overview of OceanBase Connector/J
    • Compatibility requirements
  • Instructions
    • Install and load the OceanBase Connector/J driver
    • Connect Python applications to OceanBase Database
    • Basic operations
      • Import packages
      • Create a database connection
      • Create a Statement object
      • Run queries and retrieve ResultSet objects
      • Process ResultSet objects
      • Close ResultSet and Statement objects
      • Manage tables and data
      • Commit changes
      • Close a database connection
      • Example
    • Handle SQL exceptions
    • Use CallableStatements to call stored procedures
    • Java data streams
      • Overview of Java data streams
      • LONG and LONG RAW data types
      • LOB data types
    • Use LOBs
      • Overview of LOB data types
      • LOB data interface
      • LOB locator API
      • CHAR, VARCHAR, and RAW data types
    • Data sources and URL
      • Data source overview
      • Data source characteristics and properties
      • Create and connect to a data source instance
      • Database URL
    • Result set
      • Overview of result sets
      • Limits
      • FetchSize
      • refreshRow
      • useCursorFetch
    • Statement caching
      • Overview of statement caching
      • Use statement caching
      • Reuse statement objects
    • Failover and load balancing modes
    • Batch processing
    • Security features
    • SQL NetworkCostInfo
    • Troubleshooting
    • Common APIs
      • Overview of common APIs
      • java.sql.Connection
      • java.sql.CallableStatement
      • java.sql.DatabaseMetaData
      • java.sql.Driver
      • java.sql.PreparedStatement
      • java.sql.ParameterMetaData
      • java.sql.ResultSet
      • java.sql.ResultSetMetaData
      • java.sql.Statement
      • javax.sql.ConnectionPoolDataSource
      • javax.naming.Context
      • javax.sql.PooledConnection
    • Reference
      • Supported SQL and PL data types
  • Features specific to the Oracle mode
    • Binary Protocol (Prepared Statements)
      • COM_STMT_PREPARE_EXECUTE
      • COM_STMT_SEND_PIECE_DATA
    • Call PL stored procedures
    • Result set performance
    • Use ARRAY and STRUCT classes
    • Distributed transactions
      • Overview of distributed transactions
      • XA components
      • Distributed transaction examples
    • Error messages in Oracle mode
    • Data types supported in Oracle mode

Download PDF

What's New Overview of OceanBase Connector/J Compatibility requirements Install and load the OceanBase Connector/J driver Connect Python applications to OceanBase Database Import packages Create a database connection Create a Statement object Run queries and retrieve ResultSet objects Process ResultSet objects Close ResultSet and Statement objects Manage tables and data Commit changes Close a database connection Example Handle SQL exceptions Use CallableStatements to call stored procedures Overview of Java data streams LONG and LONG RAW data types LOB data types Overview of LOB data types LOB data interface LOB locator API CHAR, VARCHAR, and RAW data types Data source overview Data source characteristics and properties Create and connect to a data source instance Database URL Overview of result sets Limits FetchSize refreshRow useCursorFetch Overview of statement caching Use statement caching Reuse statement objects Failover and load balancing modesBatch processing Security features SQL NetworkCostInfo Troubleshooting Overview of common APIs java.sql.Connection java.sql.CallableStatement java.sql.DatabaseMetaData java.sql.Driver java.sql.PreparedStatement java.sql.ParameterMetaData java.sql.ResultSet java.sql.ResultSetMetaData java.sql.Statement javax.sql.ConnectionPoolDataSource javax.naming.Context javax.sql.PooledConnection Supported SQL and PL data types COM_STMT_PREPARE_EXECUTE COM_STMT_SEND_PIECE_DATA Call PL stored procedures Result set performance Use ARRAY and STRUCT classes Overview of distributed transactions XA components Distributed transaction examples Error messages in Oracle mode Data types supported in Oracle mode
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 Connector/J
  3. V2.2.7
iconOceanBase Connector/J
V 2.2.7
  • V 2.4.17
  • V 2.4.16
  • V 2.4.15
  • V 2.4.14
  • V 2.4.5
  • V 2.4.4
  • V 2.4.3
  • V 2.4.2
  • V 2.4.1
  • V 2.4.0
  • V 2.2.11
  • V 2.2.10
  • V 2.2.7
  • V 2.2.6
  • V 2.2.3
  • V 2.2.0

java.sql.CallableStatement

Last Updated:2023-07-27 06:37:15  Updated
share
What is on this page
Description
Methods

folded

share

java.sql.CallableStatement is an interface for executing stored procedures.

Description

The JDBC API provides SQL escape syntax for stored procedures. This allows stored procedures to be called in a standard way for all relational database management systems (RDBMSs). One form of the escape syntax contains result parameters, while another does not. The result parameters must be registered as OUT parameters when they are used. Other parameters can be used for input, output, or both. The parameters are referenced in sequence by number. The number of the first parameter is 1.

{?= call <procedure-name>[(<arg1>,<arg2>, ...)]}  
{call <procedure-name>[(<arg1>,<arg2>, ...)]}

The value of an IN parameter is set by using the set method inherited from PreparedStatement. All types of OUT parameters must be registered before the stored procedure is executed. The parameter values are retrieved by using the get method provided by the corresponding class.

CallableStatement can return one or more ResultSet objects. You can use methods inherited from Statement to process multiple ResultSet objects.

For maximum portability, the called ResultSet objects and update counts need to be processed before the output parameter values are obtained.

Methods

Method Return type JDBC 4 supported in Oracle mode JDBC 4 supported in MySQL mode
registerOutParameter(int parameterIndex, int sqlType ) void Yes Yes
registerOutParameter(int parameterIndex, int sqlType, int scale) void Yes Yes
wasNull() Boolean Yes Yes
getString(int parameterIndex) String Yes Yes
getString(String parameterName) String Yes Yes
getBoolean(int parameterIndex) Boolean Yes Yes
getBoolean(String parameterName) Boolean Yes Yes
getByte(int parameterName) byte Yes Yes
getByte(String parameterName) byte Yes Yes
getShort(int parameterIndex) short Yes Yes
getShort(String parameterName) short Yes Yes
getInt(int parameterIndex) int Yes Yes
getInt(String parameterName) int Yes Yes
getLong(int parameterIndex) long Yes Yes
getLong(String parameterName) long Yes Yes
getFloat(int parameterIndex) float Yes Yes
getFloat(String parameterName) float Yes Yes
getDouble(int parameterIndex) double Yes Yes
getDouble(String parameterName) double Yes Yes
getBigDecimal(int parameterIndex) BigDecimal Yes Yes
getBigDecimal(String parameterName) BigDecimal Yes Yes
getBytes(int parameterIndex) byte[] Yes Yes
getBytes(String parameterName) byte[] Yes Yes
getDate(int parameterIndex) Date Yes Yes
getDate(String parameterName) Date Yes Yes
getTime(int parameterIndex) Time Yes Yes
getTime(String parameterName) Time Yes Yes
getTimestamp(int parameterIndex) Timestamp Yes Yes
getTimestamp(String parameterName) Timestamp Yes Yes
getObject(int parameterIndex) Object Yes Yes
getObject(String parameterName) Object Yes Yes
getRef(int parameterIndex) Ref Yes Yes
getRef(String parameterName) Ref Yes Yes
getBlob(int parameterIndex) Blob Yes Yes
getBlob(String parameterName) Blob Yes Yes
getClob(int parameterIndex) Clob Yes Yes
getClob(String parameterName) Clob Yes Yes
getArray(int parameterIndex) Array Yes Yes
getArray(String parameterName) Array Yes Yes
getRowId(int parameterIndex) RowId No No
getRowId(String parameterName) RowId No No
setRowId(String parameterName,RowId x) void No No
setNString(String parameterName,String value) void Yes Yes
setNString(int parameterIndex) void Yes Yes
setNCharacterStream(String parameterName,Reader reader, longlength) void Yes Yes
setNCharacterStream(String parameterName,Reader value) void Yes Yes
setNClob(String parameterName,NClob value) void Yes Yes
setNClob(String parameterName,Reader reader, longlength) void Yes Yes
setNClob(String parameterName,Reader reader) void Yes Yes
setClob(String parameterName,Reader reader, longlength) void Yes Yes
setClob(String parameterName,Reader reader, longlength) void Yes Yes
setClob(String parameterName,Clob x) void Yes Yes
setBlob(String parameterName,InputStream inputStream, long length) void Yes Yes
setBlob(String parameterName,Blob x) void Yes Yes
setBlob(String parameterName,InputStream inputStream) void Yes Yes
getNClob(int parameterIndex) NClob Yes Yes
getNClob(String parameterName) NClob Yes Yes
setSQLXML(String parameterName,SQLXML xmlObject) void Yes Yes
getSQLXML(int parameterIndex) SQLXML No No
getSQLXML(String parameterName) SQLXML No No
getURL(int parameterIndex) URL Yes Yes
getURL(String parameterName) URL Yes Yes
getNString(int parameterIndex) String Yes Yes
getNString(String parameterName) String Yes Yes
getCharacterStream(int parameterIndex) Reader Yes Yes
getCharacterStream(String parameterName) Reader Yes Yes
getNCharacterStream(int parameterIndex) Reader Yes Yes
getNCharacterStream(String parameterName) Reader Yes Yes

Previous topic

java.sql.Connection
Last

Next topic

java.sql.DatabaseMetaData
Next
What is on this page
Description
Methods