exception2 (Eng) error) java, MySQL) Exception : Statement.executeQuery() cannot issue statements that do not produce result sets Eng) java, MySQL ) Exception : Statement.executeQuery() cannot issue statements that do not produce result sets Error message : Statement.executeQuery() cannot issue statements that do not produce result sets When I did my first project using MySQL DB, this error made me stuck for a time. In conclusion, this error is occurred by the incorrect use of java SQL statement syntax. If you want to exec.. 2022. 3. 16. 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 다음