커넥션 획득, (Prepared)Statement 실행 (SQL 전달), 리소스 해제 순으로 진행
(Prepared)Statement
리소스를 해제하지 않으면 리소스 누수 발생
리소스 누수
데이터를 변경할 때는 statement.executeUpdate()를, 조회할 때는 statement.executeQuery()를 사용 executeUpdate()는 쿼리에 의해 영향 받은 로우 수를 int로 반환
statement.executeUpdate()
statement.executeQuery()
executeUpdate()
int