java.sql.PreparedStatement
java.sql.PreparedStatement is the statement preparation interface.
Method |
Return Type |
JDBC 4 Support |
---|---|---|
clearParameters() |
void |
Yes |
execute() |
Boolean |
Yes |
executeQuery() |
ResultSet |
Yes |
excuteUpdate() |
int |
Yes |
getMetaData() |
ResultSetMetaData |
Yes |
setBoolean(int parameterIndex, boolean x) |
void |
Yes |
setBigDecimal(int parameterIndex, BigDecimal x) |
void |
Yes |
setByte(int parameterIndex, byte x) |
void |
Yes |
setBytes(int parameterIndex, byte[] x) |
void |
Yes |
setDate(int parameterIndex, Date x) |
void |
Yes |
setDouble(int parameterIndex, double x) |
void |
Yes |
setFloat(int parameterIndex, float x) |
void |
Yes |
setInt(int parameterIndex, int x) |
void |
Yes |
setLong(int parameterIndex, long x) |
void |
Yes |
setNString(int parameterIndex, String value) |
void |
Yes |
setShort(int parameterIndex, short x) |
void |
Yes |
setString(int parameterIndex, String x) |
void |
Yes |
addBatch() |
void |
Yes |
executeBatch() |
int[] |
Yes |
clearBatch() |
void |
Yes |

- addBatch() and execute() can be executed only after clearBatch().
- Calling the executeBatch() method does not clear the batch. Clear batch by explicitly calling clearBatch().
- After adding a batch of bound variables, you can reuse these values (to add another batch) without needing to use the set*() method again.
- The following methods are inherited from java.sql.Statement: close, execute, executeQuery, executeUpdate, getConnection, getResultSet, getUpdateCount, isClosed, setMaxRows, and setFetchSize.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot