# java.sql.Statement interface

Derby does not implement the setEscapeProcessing method of java.sql.Statement. In addition, the cancel method raises a "Feature not supported" exception.

The following table describes features of Statement methods that are specific to Derby.

Table 1. Implementation notes on Statement methods
Returns | Signature | Implementation Notes
--- | --- | ---
ResultSet | getGeneratedKeys() | If the user has indicated that auto-generated keys should be made available, this method returns the same results as a call to the IDENTITY_VAL_LOCAL function. Otherwise this method returns null.
boolean | execute(String sql, int [] columnIndexes) | Every column index in the array must correlate to an auto-increment column within the target table of the INSERT.
boolean | execute(String sql, String [] columnNames) | Every column name in the array must designate an auto-increment column within the target table of the INSERT.
int | executeUpdate(String sql, int [] columnIndexes) | Every column index in the array must correlate to an auto-increment column within the target table of the INSERT.
int | executeUpdate(String sql, String [] columnNames) | Every column name in the array must designate an auto-increment column within the target table of the INSERT.

- ResultSet objects
  An error that occurs when a SELECT statement is first executed prevents a ResultSet object from being opened on it. The same error does not close the ResultSet if it occurs after the ResultSet has been opened.
- Autogenerated keys
  JDBC's auto-generated keys feature provides a way to retrieve values from columns that are part of an index or have a default value assigned.

Parent topic: JDBC reference
Related reference
java.sql.Driver interface
java.sql.DriverManager.getConnection method
java.sql.Connection interface
java.sql.DatabaseMetaData interface
java.sql.CallableStatement interface
java.sql.PreparedStatement interface
java.sql.ResultSet interface
java.sql.ResultSetMetaData interface
java.sql.SQLException class
java.sql.SQLWarning class
java.sql.SQLXML interface
java.sql.Savepoint interface
Mapping of java.sql.Types to SQL types
Features supported on JDBC 4.1 and above
JDBC 4.2-only features
JDBC escape syntax