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
What are the jdbc api components?
What happens if we don't close the connection in jdbc?
What are the different types of statements in jdbc?
Can I set up a connection pool with multiple user IDs? The single ID we are forced to use causes problems when debugging the DBMS.
How many types of jdbc drivers are there?
What is the latest version of JDBC? What are the new features added in that?
What is the use of the statement in jdbc?
What is thin driver in jdbc?
What are common JDBC Exceptions?
What is the role of class.forname while loading drivers?
When does the result for an sql statement return null?
What is a lock in jdbc?
What are 4 drivers available in JDBC? At what situation are four of the drivers used?
Is jdbc faster than odbc?
How does jdbc connect to database?