Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
ResultSet rs = stmt.executeQuery("SELECT * FROM tab");
int count = 0;
rs.last();
count = rs.getRow();
//count就是记录集返回的记录数
ResultSet rs = stmt.executeQuery("SELECT * FROM tab");
int count = 0;
rs.last();
count = rs.getRow();
//count就是记录集返回的记录数
select distinct name from tab
即:选出不同的名字的记录的记录数