# java.sql.ResultSet
java.sql.ResultSet是执行结果集接口。
表1对java.sql.ResultSet的支持情况 
| 方法名 | 返回值类型 | 支持JDBC 4 |
|:---|:---|:---|
| next()                                              | boolean                                               | Yes                                                        |
| close()                                             | void                                                    | Yes                                                      |
| wasNull()                                             | boolean                                              | Yes                                                     |
| getString(int)                                       | String                                               | Yes                                                      |
| getString(String)                                    | String                                               | Yes                                                    |
| getBoolean(int)                                     | boolean                                             | Yes                                                      |
| getBoolean(String)                                  | boolean                                              | Yes                                                     |
| getByte(int)                                          | byte                                                 | Yes                                                      |
| getByte(String)                                      | byte                                                   | Yes                                                      |
| getShort(int)                                        | short                                                | Yes                                                      |
| getShort(String)                                      | short                                                 | Yes                                                       |
| getInt(int)                                        | int                                                  | Yes                                                       |
| getInt(String)                                      | int                                                   | Yes                                                      |
| getLong(int)                                       | long                                                | Yes                                                       |
| getLong(String)                                      | long                                                   | Yes                                                       |
| getFloat(int)                                       | float                                                | Yes                                                       |
| getFloat(String)                                  | float                                                  | Yes                                                      |
| getDouble(int)                                     | double                                                 | Yes                                                     |
| getDouble(String)                                 | double                                                 | Yes                                                      |
| getBigDecimal(int, int)                            | BigDecimal                                             | Yes                                                     |
| getBigDecimal(int)                                  | BigDecimal                                            | Yes                                                      |
| getBytes(int)                                      | byte\[\]                                                | Yes                                                    |
| getDate(int)                                         | Date                                                   | Yes                                                      |
| getTime(int)                                       | Time                                                  | Yes                                                       |
| getTimestamp(int)                                  | Timestamp                                             | Yes                                                    |
| getAsciiStream(int)                                   | InputStream                                             | Yes                                                      |
| getUnicodeStream(int)                               | InputStream                                           | Yes                                                      |
| getBinaryStream(int)                                | InputStream                                          | Yes                                                     |
| getCharacterStream(int)                           | Reader                                                 | Yes                                                     |
| getObject(int)                                       | Object                                                 | Yes                                                      |
| getObject(String)                                 | Object                                                 | Yes                                                      |
| getNString(int)                                      | String                                                 | Yes                                                        |
| getClob(int)                                      | Clob                                                 | Yes                                                       |
| getClob(String)                                    | Clob                                                   | Yes                                                     |
| getWarnings()                                      | SQLWarning                                             | Yes                                                       |
| clearWarnings()                                     | void                                                 | Yes                                                     |
| getCursorName()                                     | String                                                  | Yes                                                       |
| getMetaData()                                        | ResultSetMetaData                                      | Yes                                                     |
| findColumn(String)                                 | int                                                    | Yes                                                      |
| isBeforeFirst()                                       | boolean                                              | Yes                                                     |
| isAfterLast()                                      | boolean                                              | Yes                                                       |
| isFirst()                                           | boolean                                              | Yes                                                    |
| isLast()                                            | boolean                                                | Yes                                                     |
| beforeFirst()                                       | void                                                  | Yes                                                     |
| afterLast()                                         | void                                                 | Yes                                                      |
| first()                                              | boolean                                                | Yes                                                        |
| last()                                              | boolean                                              | Yes                                                      |
| getRow()                                            | int                                                  | Yes                                                     |
| absolute(int)                                        | boolean                                              | Yes                                                       |
| previous()                                         | boolean                                                | Yes                                                       |
| relative(int)                                        | boolean                                                | Yes                                                      |
| getFetchDirection()                                  | int                                                    | Yes                                                        |
| setFetchDirection(int)                              | void                                                   | No                                                      |
| getFetchSize()                                      | int                                                    | Yes                                                      |
| setFetchSize(int)                                  | void                                                   | Yes                                                      |
| getType()                                            | int                                                   | Yes                                                      |
| getConcurrency()                                    | int                                                   | Yes                                                       |
| getStatement()                                    | Statement                                              | Yes                                                     |
| isClosed()                                           | boolean                                               | Yes                                                     |
| getHoldability()                                    | int                                                  | No                                                       |
| updateNull(int)                                     | void                                                   | No                                                       |
| updateBoolean(int, boolean)                        | void                                                  | No                                                       |
| updateByte(int, byte)                               | void                                                 | No                                                       |
| updateShort(int, short)                             | void                                                   | No                                                       |
| updateInt(int, int)                                  | void                                                   | No                                                        |
| updateLong(int, long)                                | void                                                 | No                                                       |
| updateFloat(int, float)                            | void                                                    | No                                                        |
| updateDouble(int, double)                           | void                                                    | No                                                      |
| updateBigDecimal(int, BigDecimal)                   | void                                                 | No                                                      |
| updateString(int, String)                           | void                                                  | No                                                       |
| updateBytes(int, byte\[\])                            | void                                                 | No                                                       |
| updateDate(int, Date)                              | void                                                 | No                                                       |
| updateTime(int, Time)                             | void                                                  | No                                                     |
| updateTimestamp(int, Timestamp)                    | void                                                  | No                                                       |
| updateAsciiStream(int, InputStream, int)            | void                                                  | No                                                       |
| updateBinaryStream(int, InputStream, int)         | void                                                  | No                                                       |
| updateCharacterStream(int, Reader, int)             | void                                                  | No                                                      |
| updateObject(int, Object, int)                        | void                                                  | No                                                       |
| updateObject(int, Object)                           | void                                                  | No                                                        |
| insertRow()                                        | void                                                 | No                                                       |
| updateRow()                                         | void                                                  | No                                                       |
| deleteRow()                                          | void                                                  | No                                                       |
| refreshRow()                                        | void                                                  | No                                                       |
| cancelRowUpdates()                                | void                                                  | No                                                        |
| moveToInsertRow()                                   | void                                                 | No                                                      |
| moveToCurrentRow()                                   | void                                                 | No                                                        |
| getRef(int)                                          | Ref                                                 | No                                                        |
| getBlob(int)                                        | Blob                                                   | No                                                      |
| getArray(int)                                      | Array                                                 | No                                                       |
| getURL(int)                                        | URL                                                    | No                                                        |
| getRowId(int)                                       | RowId                                                 | No                                                        |
| getNClob(int)                                      | NClob                                                  | No                                                     |
| getSQLXML(int)                                      | SQLXML                                              | No                                                       |
   
![](https://support.huaweicloud.com/usermanual-aidatalake/public_sys-resources/note_3.0-zh-cn.png)
- 一个Statement不能有多个处于"open"状态的ResultSet。
- 用于遍历结果集(ResultSet)的游标(Cursor)在被提交后不能保持"open"的状态。
 
