by, 03-10-2012 at 08:40 AM (461 Views)
Execute method is called from statement for execution of a query.
- execute: In case when 1st object which query returns is ResultSet, returns true. This method is used when one or more than one ResultSet objects are returned by query. ResultSet objects are retrieved that have been returned from query, by calling Statement.getResultSet repeatedly.
- executeQuery: One ResultSet object is retuned.
- executeUpdate: An integer is returned which presents the rows that have been affected by SQL statement. This method could be used while using UPDATE, DELETE or INSERT SQL statements.