随笔都是学习笔记
随笔仅供参考,为避免笔记中可能出现的错误误导他人,请勿转载。
posts - 398,comments - 0,views - 13万

简介:

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 getColumnType​Name(int column) throws SQLException

得到指定列的表名:public String getTableName​(int column) throws SQLException
复制代码

 

posted on   时间完全不够用啊  阅读(243)  评论(0编辑  收藏  举报
(评论功能已被禁用)
相关博文:
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示