java中怎样判断sql.executeQuery()中有无结果?除了next()方法

2025-06-22 15:06:07
推荐回答(4个)
回答1:

使用next完全可以达到 不需要别的方法 if(rs.next())

回答2:

boolean first() throws SQLException

回答3:

isnull方法也可以

回答4:

if(rs.next()){

}
这样也是经常用.