简介:
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
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)