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

Answer Posted / kundlik

execute():-execute method is used to fire DDL Command means (CREATE,ALTER,DROP Etc) on to the database,It's return type is true or false.

executeUpdate():Its used to fired DML Command on to the database. like (insert,update,delete) etc.its return type is ResultSet.


executeQuery():is used to only retrieve data from database.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can we maintain the integrity of a database by using jdbc?

533


What is java soft framework?

545


What is jdbc class forname?

487


What is drivermanager in java?

487


What is the full form of jdbc and what is its purpose?

539






What is a lock in jdbc?

539


How do I check in my code whether a maximum limit of database connections have been reached?

579


How to move the cursor in scrollable resultset ?

569


What is the role of class.forname while loading drivers?

561


What do you understand by jdbc driver and explain its types?

491


What is meant by connection string?

556


What are the different types of interfaces in the api component?

517


What packages are used by jdbc?

501


what is the meaning of following code snippets Class c=class.forName(driverClassName); Driver d=(driver)c.newInstance();

4326


What is the use of jdbc api?

503