版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/m0_37681914/article/details/80640177
错误代码
ResultSet rs = stmt.executeQuery(sql);
rs.getInt(1);
解决办法
ResultSet rs = stmt.executeQuery(sql);
while (rs.next()) {
rs.getInt(1);
}