executeQuery1 error) 자바, MySQL) 예외 : Statement.executeQuery() cannot issue statements that do not produce result sets Statement.executeQuery() cannot issue statements that do not produce result sets 프로젝트 진행중에 발생한 SQL Exception 이다. 원인을 빠르게 찾지 못해 고생했다. SELECT 쿼리: .executeQuery() 사용 그외 (INSERT, DELECT 등)의 쿼리: .execute() 혹은 .executeUpdate() 사용 위 두개의 메서드를 혼동하여 사용할 경우 에러가 발생한다. .executeQuery() - ResultSet 을 리턴 .executeUpdate() - int 값 리턴 - 영향받는 레코드의 수를 리턴한다 - CREATE / DROP 는 -1을 리턴 .execute() 는 boolean 값 리턴 - 쿼리 결과가 .. 2022. 2. 19. 이전 1 다음