简介:
public interface ResultSet
extends Wrapper, AutoCloseable
方法:
将光标移动到指定的行号:public boolean absolute(int row) throws SQLException
将光标移动到最后一行之后:public void afterLast() throws SQLException
将光标移动到第一行之前:public void beforeFirst() throws SQLException
从此 ResultSet 对象和基础数据库中删除当前行:public void deleteRow() throws SQLException
将光标移动到第一行:public boolean first() throws SQLException
将光标移动到最后一行:public boolean last() throws SQLException
返回的数据框是否存在下一行:public boolean next() throws SQLException
将光标移动到此 ResultSet 对象中的上一行:public boolean previous() throws SQLException
使用指定的Array更新指定列数据:public void updateArray(String columnLabel, Array x) throws SQLException
检索此 ResultSet 对象的当前行中指定列的值,返回java.sql.Date 对象:public Date getDate(String columnLabel) throws SQLException
检索此 ResultSet 对象的当前行中指定列的值,返回double:public double getDouble(int columnIndex) throws SQLException
检索此 ResultSet 对象的当前行中指定列的值,返回float:public float getFloat(int columnIndex) throws SQLException
检索此 ResultSet 对象的当前行中指定列的值,返回int:public int getInt(int columnIndex) throws SQLException
检索此 ResultSet 对象的当前行中指定列的值,返回long:public long getLong(int columnIndex) throws SQLException
检索此 ResultSet 对象的当前行中指定列的值,返回short:public short getShort(int columnIndex) throws SQLException
检索此 ResultSet 对象的当前行中指定列的值,返回String:public String getString(int columnIndex) throws SQLException
检索此 ResultSet 对象的当前行中指定列的值,返回java.sql.Time 对象:public Time getTime(String columnLabel) throws SQLException
检索此 ResultSet 对象的类型:public int getType() throws SQLException
返回当前的行号:public int getRow() throws SQLException
返回Statement 对象(SQL对象):public Statement getStatement() throws SQLException
获取元数据:
public ResultSetMetaData getMetaData() throws SQLException
元数据简介:
public interface ResultSetMetaData
extends Wrapper
方法:
获取列名的Java类型:public String getColumnClassName(int column) throws SQLException
返回表格的列数:public int getColumnCount() throws SQLException
获取指定列的名称:public String getColumnName(int column) throws SQLException
检索指定列的SQL类型的名称:public int getColumnTypeName(int column) throws SQLException
得到指定列的表名:public String getTableName(int column) throws SQLException