티스토리 뷰
728x90
반응형
executeQuery
"executeQuery"는 select 쿼리문에서 사용한다.
ResultSet executeQuery()
throws SQLException
Executes the SQL query in this PreparedStatement object and returns the ResultSet object generated by the query.
Returns:
a ResultSet object that contains the data produced by the query; never null
Throws:
SQLException - if a database access error occurs; this method is called on a closed PreparedStatement or the SQL statement does not return a ResultSet object
SQLTimeoutException - when the driver has determined that the timeout value that was specified by the setQueryTimeout method has been exceeded and has at least attempted to cancel the currently running Statement
executeUpdate
"executeUpdate"는 insert, update, delate 쿼리문에서 사용한다.
int executeUpdate()
throws SQLException
Executes the SQL statement in this PreparedStatement object, which must be an SQL Data Manipulation Language (DML) statement, such as INSERT, UPDATE or DELETE; or an SQL statement that returns nothing, such as a DDL statement.
Returns:
either (1) the row count for SQL Data Manipulation Language (DML) statements or (2) 0 for SQL statements that return nothing
Throws:
SQLException - if a database access error occurs; this method is called on a closed PreparedStatement or the SQL statement returns a ResultSet object
SQLTimeoutException - when the driver has determined that the timeout value that was specified by the setQueryTimeout method has been exceeded and has at least attempted to cancel the currently running Statement
728x90
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- java web-mvc
- 제품 등록
- 표현 언어(expression language)
- await
- REST API
- 스프링 프레임워크(spring framework)
- 문자 자르기
- java 키워드 정리
- 특정 문자를 기준으로 자르기
- nl2br
- React
- 스프링 시큐리티(spring security)
- 메이븐(maven)
- java-개발 환경 설정하기
- error-java
- 람다식(lambda expression)
- 스프링 시큐리티(spring security)-http basic 인증
- java.sql
- 스프링 프레임워크(spring framewordk)
- system.io
- 진수 변환
- 상품 등록
- System.Diagnostics
- jstl(java standard tag library)-core
- jstl(java standard tag library)
- MainActor
- jsp 오픈 소스
- .submit()
- 인텔리제이(intellij)
- In App Purchase
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
글 보관함