boolean execute(String sql) throws SQLException
Returns:
true if the first result is a ResultSet object; false if it is an update count or there are no results
Throws:
SQLException – if a database access error occurs, this method is called on a closed Statement, the method is called on a PreparedStatement or CallableStatement
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