About this task
There are two methods for executing an SQL statement: executeSQLQuery()
and executeSQLUpdate().
- The executeSQLQuery() method executes an SQL statement that returns a
single result set, and also updates the operation context with the result
set. It takes the literal SQL statement, an output formatter name, and a context
instance as its arguments.
- The executeSQLUpdate() method executes an SQL INSERT, UPDATE,
or DELETE statement. It takes a literal SQL statement and returns the row
count (the number of affected rows).