public abstract ResultSet getGeneratedKeys () throws SQLException

Retrieves any auto-generated keys created as a result of executing this Statement object. If this Statement object did not generate any keys, an empty ResultSet object is returned.

Note:If the columns which represent the auto-generated keys were not specified, the JDBC driver implementation will determine the columns which best represent the auto-generated keys.

Returns:  a ResultSet object containing the auto-generated key(s) generated by the execution of this Statement object

Exceptions:
SQLException    if a database access error occurs or this method is called on a closed Statement
SQLFeatureNotSupportedException    if the JDBC driver does not support this method

Since:  1.4