Example usage for Java java.sql Statement fields, constructors, methods, implement or subclass
The text is from its open source code.
int | CLOSE_CURRENT_RESULT The constant indicating that the current ResultSet object should be closed when calling getMoreResults . |
int | KEEP_CURRENT_RESULT The constant indicating that the current ResultSet object should not be closed when calling getMoreResults . |
int | CLOSE_ALL_RESULTS The constant indicating that all ResultSet objects that have previously been kept open should be closed when calling getMoreResults . |
int | SUCCESS_NO_INFO The constant indicating that a batch statement executed successfully but that no count of the number of rows it affected is available. |
int | EXECUTE_FAILED The constant indicating that an error occurred while executing a batch statement. |
int | RETURN_GENERATED_KEYS The constant indicating that generated keys should be made available for retrieval. |
int | NO_GENERATED_KEYS The constant indicating that generated keys should not be made available for retrieval. |
void | addBatch(String sql) Adds the given SQL command to the current list of commands for this Statement object. |
void | cancel() Cancels this Statement object if both the DBMS and driver support aborting an SQL statement. |
void | clearBatch() Empties this Statement object's current list of SQL commands. |
void | clearWarnings() Clears all the warnings reported on this Statement object. |
void | close() Releases this Statement object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed. |
boolean | execute(String sql) Executes the given SQL statement, which may return multiple results. |
boolean | execute(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. |
boolean | execute(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. |
boolean | execute(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. |
ResultSet | executeQuery(String sql) Executes the given SQL statement, which returns a single ResultSet object. |
int | executeUpdate(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. |
int | executeUpdate(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. |
int | executeUpdate(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. |
int | executeUpdate(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. |
Class> | getClass() Returns the runtime class of this Object . |
Connection | getConnection() Retrieves the Connection object that produced this Statement object. |
int | getFetchDirection() Retrieves the direction for fetching rows from database tables that is the default for result sets generated from this Statement object. |
int | getFetchSize() Retrieves the number of result set rows that is the default fetch size for ResultSet objects generated from this Statement object. |
ResultSet | getGeneratedKeys() Retrieves any auto-generated keys created as a result of executing this Statement object. |
int | getMaxFieldSize() 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. |
int | getMaxRows() Retrieves the maximum number of rows that a ResultSet object produced by this Statement object can contain. |
boolean | getMoreResults() 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 . |
int | getQueryTimeout() Retrieves the number of seconds the driver will wait for a Statement object to execute. |
ResultSet | getResultSet() Retrieves the current result as a ResultSet object. |
int | getResultSetConcurrency() Retrieves the result set concurrency for ResultSet objects generated by this Statement object. |
int | getResultSetHoldability() Retrieves the result set holdability for ResultSet objects generated by this Statement object. |
int | getResultSetType() Retrieves the result set type for ResultSet objects generated by this Statement object. |
int | getUpdateCount() Retrieves the current result as an update count; if the result is a ResultSet object or there are no more results, -1 is returned. |
SQLWarning | getWarnings() Retrieves the first warning reported by calls on this Statement object. |
boolean | isClosed() Retrieves whether this Statement object has been closed. |
void | setCursorName(String name) Sets the SQL cursor name to the given String , which will be used by subsequent Statement object execute methods. |
void | setEscapeProcessing(boolean enable) Sets escape processing on or off. |
void | setFetchDirection(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. |
void | setFetchSize(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 . |
void | setMaxFieldSize(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. |
void | setMaxRows(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. |
void | setPoolable(boolean poolable) Requests that a Statement be pooled or not pooled. |
void | setQueryTimeout(int seconds) Sets the number of seconds the driver will wait for a Statement object to execute to the given number of seconds. |
String | toString() Returns a string representation of the object. |
T | unwrap(java.lang.Class Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy. |