자바/jsp와 서블릿
rs.next()
현규띠
2022. 10. 30. 20:22
https://crescentm.tistory.com/406
JDBC ResultSet 위치 이동
흔히 JDBC로 결과값이 있을때 출력을 하면 rs.next()를 많이 사용합니다 그런데 rs.next를 한번이라도 사용하면 ResultSet의 위치는 다음으로 넘어갑니다 예를 들어 rs = stmt.executeQuery("select * from visito..
crescentm.tistory.com
https://keyboardfoot.tistory.com/47
rs.next()는 왜 첫 번째 행을 의미할까, 왜 첫 번째 행을 생략하지않을 까
SQL문을 통해 얻은 데이터에서 첫번째행에서 마지막 행까지를 추출할때나 행이 있는지 없는지 판단할때 주로 while문을 통해 rs.next()가 사용된다. while (rs.next()) { String coffeeName = rs.getString("COF_N..
keyboardfoot.tistory.com