Answer:
Statement execute(String query) is used to execute any SQL query and it returns TRUE if the result is an ResultSet such as running Select queries. The output is FALSE when there is no ResultSet object such as running Insert or Update queries. We can use getResultSet() to get the ResultSet and getUpdateCount() method to retrieve the update count.
Previous Question | Next Question |
Tell me what is JDBC Driver? | Can you list some of the important annotations in annotation-based Spring configuration? |