老问题了
如果你用的是jdbc2.0,好说
resultset.afterLast();//Moves the cursor to the end of this ResultSet object, just after the last row.
resultset.previous();
resultset.getRow(); //Retrieves the current row number.如果用的是更低版本,那就没有现成的方法,自己用循环作吧
如果你用的是jdbc2.0,好说
resultset.afterLast();//Moves the cursor to the end of this ResultSet object, just after the last row.
resultset.previous();
resultset.getRow(); //Retrieves the current row number.如果用的是更低版本,那就没有现成的方法,自己用循环作吧
不过还有个方法
(假设记录集为XXXRs)
....
int count=0
while(XXXRs.next())
{
count++;
}