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

Answer Posted / bhoopesh alladi

execute()- is for invoking the functions or stored
procedures of SQL by the CallableStatement.

executeUpdata()- is for the operations such as insert,
update or delete on SQL by PreparedStatement, Statement.

executeQuery() - is for operation select of Sql by
PreparedStatement or Statement.

Is This Answer Correct ?    69 Yes 21 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the difference between rowset vs. Resultset in jdbc?

575


Write an sql to find all records having all numeric characters in a field ?

489


Explain the importance of drivermanager.

708


What is jdbc odbc driver?

571


Why do you use a data source object for a connection?

537






Can we return resultset in java?

472


What is jdbc url for mysql?

588


How do you insert images into database using jdbc?

561


How to use JDBC API to call Stored Procedures?

549


Explain some new features available in jdbc 4.0?

607


What port does jdbc use?

491


Where is jdbc used?

483


How do I receive a ResultSet from a stored procedure?

517


How can we retrieve the file in the oracle database?

512


What does connection pooling mean ?

562