OracleStatement Implements Statement
As you’ve experienced throughout this chapter, the Oracle
implementation of Statement
has several extensions
to the JDBC standard. Let’s finish this chapter with a review
of those extensions. When you use a Connection
object returned by an
oracle.jdbc.driver.OracleDriver
object to create a
Statement
object, what is actually returned is
an
OracleStatement
object. The JDBC
Statement
object is an interface that defines a
set of methods that must be implemented by any class that states it
implements java.sql.Statement
.
oracle.jdbc.driver.OracleStatement
implements
java.sql.Statement
, providing you with all the
standard JDBC methods; plus, it implements the following
OracleStatement
methods:
clearDefines( ) throws SQLException defineColumnType(int column_index, int type) throws SQLException defineColumnType(int column_index, int type, int max_size) throws SQLException defineColumnType(int column_index, int typeCode, String typeName) throws SQLException String getOriginalSql( ) throws SQLException String getRevisedSql( ) throws SQLException int getRowPrefetch( ) int sendBatch( ) throws SQLException setResultSetCache(OracleResultSetCache cache) throws SQLException setRowPrefetch(int value) throws SQLException
You should now have a good grasp of how to use a
Statement
object to execute a SQL statement.
Let’s move on to Chapter 10, where
we’ll cover everything you’d like to know, and perhaps a
little more, about
ResultSets
.
Get Java Programming with Oracle JDBC now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.