Creating and Executing SQL Statements 2 – Database Connectivity
When calling the execute() method with a SQL statement as a String parameter, it might not be possible to know a priori what type of SQL statement will be executed. However, this method would return true if the statement happens to be a SELECT query; otherwise, it returns false. As shown in the code below,