To run a query embedded in a Statement
object, you use variants of the execute
method. Important variants of this method are listed in Table 4-1.
Table 4-1 Key Query Execution Methods for java.sql.Statement
Method Name | Return Type | Description |
---|---|---|
|
|
Runs the given SQL statement, which returns a Boolean response: true if the query runs successfully and false if it does not. |
|
|
Adds a set of parameters to a |
|
|
Submits a batch of commands to the database for running, and returns an array of update counts if all commands run successfully. |
|
|
Runs the given SQL statement, which returns a single |
|
|
Runs the given SQL statement, which may be an |