mysql执行查询报错:java.sql.SQLException: Before start of result set

版权声明:转载请联系博主、标明出处 https://blog.csdn.net/jyfbug/article/details/89226499

这个是因为在查询出resultSet后未进行.next(),直接进行解析取值。
正确的操作是:
 

while (resultSet.next()){
      //取值
}

猜你喜欢

转载自blog.csdn.net/jyfbug/article/details/89226499