当前位置: 技术问答>java相关
如何得到一个数据库查询结果集ResultSet对象包含的记录数?
来源: 互联网 发布时间:2015-08-04
本文导语: 如题 | ResultSet rst; rst.last(); int rowCount = rst.getRow(); | jdbc2 stmt=conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
如题
|
ResultSet rst;
rst.last();
int rowCount = rst.getRow();
rst.last();
int rowCount = rst.getRow();
|
jdbc2
stmt=conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
stmt=conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);