What is execute(), executeUpdate() and executeQuery()
methods?

Answer Posted / trio

boolean execute()
Executes the SQL statement in this PreparedStatement
object, which may be any kind of SQL statement.

ResultSet executeQuery()
Executes the SQL query in this PreparedStatement object and
returns the ResultSet object generated by the query.

int executeUpdate()
Executes the SQL statement in this PreparedStatement
object, which must be an SQL INSERT, UPDATE or DELETE
statement; or an SQL statement that returns nothing, such
as a DDL statement.

Is This Answer Correct ?    39 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an SQL Locator?

587


What is jdbc thin client?

503


Differentiate between stored procedure and functions?

616


What does the jdbc resultset interface?

527


When do we use execute method in java jdbc?

543






Which jdbc driver is the fastest driver?

551


What is the difference between jdbc and odbc?

525


What are the benefits of PreparedStatement over Statement?

526


What are the different classes through which JDBC represents statements?

503


How to use JDBC to connect Microsoft Access?

593


How many categories of jdbc drivers are there?

484


What is in term of jdbc a datasource?

474


Why we use jdbc instead of odbc?

497


What should be done for auto generating primary key id in a table ?

525


What is setautocommit in jdbc?

488