Java java.sql Statement fields, constructors, methods, implement or subclass

Example usage for Java java.sql Statement fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.sql Statement.

The text is from its open source code.

Implementation

java.sql.Statement has the following implementations.
Click this link to see all its implementation.

Field

intCLOSE_CURRENT_RESULT
The constant indicating that the current ResultSet object should be closed when calling getMoreResults.
intKEEP_CURRENT_RESULT
The constant indicating that the current ResultSet object should not be closed when calling getMoreResults.
intCLOSE_ALL_RESULTS
The constant indicating that all ResultSet objects that have previously been kept open should be closed when calling getMoreResults.
intSUCCESS_NO_INFO
The constant indicating that a batch statement executed successfully but that no count of the number of rows it affected is available.
intEXECUTE_FAILED
The constant indicating that an error occurred while executing a batch statement.
intRETURN_GENERATED_KEYS
The constant indicating that generated keys should be made available for retrieval.
intNO_GENERATED_KEYS
The constant indicating that generated keys should not be made available for retrieval.

Method

voidaddBatch(String sql)
Adds the given SQL command to the current list of commands for this Statement object.
voidcancel()
Cancels this Statement object if both the DBMS and driver support aborting an SQL statement.
voidclearBatch()
Empties this Statement object's current list of SQL commands.
voidclearWarnings()
Clears all the warnings reported on this Statement object.
voidclose()
Releases this Statement object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed.
booleanexecute(String sql)
Executes the given SQL statement, which may return multiple results.
booleanexecute(String sql, int autoGeneratedKeys)
Executes the given SQL statement, which may return multiple results, and signals the driver that any auto-generated keys should be made available for retrieval.
booleanexecute(String sql, int columnIndexes[])
Executes the given SQL statement, which may return multiple results, and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval.
booleanexecute(String sql, String columnNames[])
Executes the given SQL statement, which may return multiple results, and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval.
int[]executeBatch()
Submits a batch of commands to the database for execution and if all commands execute successfully, returns an array of update counts.
ResultSetexecuteQuery(String sql)
Executes the given SQL statement, which returns a single ResultSet object.
intexecuteUpdate(String sql)
Executes the given SQL statement, which may be an INSERT, UPDATE, or DELETE statement or an SQL statement that returns nothing, such as an SQL DDL statement.
intexecuteUpdate(String sql, int autoGeneratedKeys)
Executes the given SQL statement and signals the driver with the given flag about whether the auto-generated keys produced by this Statement object should be made available for retrieval.
intexecuteUpdate(String sql, int columnIndexes[])
Executes the given SQL statement and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval.
intexecuteUpdate(String sql, String columnNames[])
Executes the given SQL statement and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval.
ClassgetClass()
Returns the runtime class of this Object .
ConnectiongetConnection()
Retrieves the Connection object that produced this Statement object.
intgetFetchDirection()
Retrieves the direction for fetching rows from database tables that is the default for result sets generated from this Statement object.
intgetFetchSize()
Retrieves the number of result set rows that is the default fetch size for ResultSet objects generated from this Statement object.
ResultSetgetGeneratedKeys()
Retrieves any auto-generated keys created as a result of executing this Statement object.
intgetMaxFieldSize()
Retrieves the maximum number of bytes that can be returned for character and binary column values in a ResultSet object produced by this Statement object.
intgetMaxRows()
Retrieves the maximum number of rows that a ResultSet object produced by this Statement object can contain.
booleangetMoreResults()
Moves to this Statement object's next result, returns true if it is a ResultSet object, and implicitly closes any current ResultSet object(s) obtained with the method getResultSet.
intgetQueryTimeout()
Retrieves the number of seconds the driver will wait for a Statement object to execute.
ResultSetgetResultSet()
Retrieves the current result as a ResultSet object.
intgetResultSetConcurrency()
Retrieves the result set concurrency for ResultSet objects generated by this Statement object.
intgetResultSetHoldability()
Retrieves the result set holdability for ResultSet objects generated by this Statement object.
intgetResultSetType()
Retrieves the result set type for ResultSet objects generated by this Statement object.
intgetUpdateCount()
Retrieves the current result as an update count; if the result is a ResultSet object or there are no more results, -1 is returned.
SQLWarninggetWarnings()
Retrieves the first warning reported by calls on this Statement object.
booleanisClosed()
Retrieves whether this Statement object has been closed.
voidsetCursorName(String name)
Sets the SQL cursor name to the given String, which will be used by subsequent Statement object execute methods.
voidsetEscapeProcessing(boolean enable)
Sets escape processing on or off.
voidsetFetchDirection(int direction)
Gives the driver a hint as to the direction in which rows will be processed in ResultSet objects created using this Statement object.
voidsetFetchSize(int rows)
Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed for ResultSet objects generated by this Statement.
voidsetMaxFieldSize(int max)
Sets the limit for the maximum number of bytes that can be returned for character and binary column values in a ResultSet object produced by this Statement object.
voidsetMaxRows(int max)
Sets the limit for the maximum number of rows that any ResultSet object generated by this Statement object can contain to the given number.
voidsetPoolable(boolean poolable)
Requests that a Statement be pooled or not pooled.
voidsetQueryTimeout(int seconds)
Sets the number of seconds the driver will wait for a Statement object to execute to the given number of seconds.
StringtoString()
Returns a string representation of the object.
Tunwrap(java.lang.Class iface)
Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy.