What is execute(), executeUpdate() and executeQuery()
methods?
Answer Posted / ratheesh.a
executeQuery(): This is a method/function used in jdbc
programs. this method will return a 'Resulset' object.
Through this method we can access the result of the query
Usually the Select query is used here..
executeUpadte(): This method is mainly used for updating
queries.. such as 'insert,update,delete' etc... returns an
integer value which shows how many rows are updated...
execute() :What ever the sql queries we are giving in the
other 2 methods can also be include here
This will return a boolean value if it returns 'true' means
query executed successfuly else not..
| Is This Answer Correct ? | 4 Yes | 3 No |
Post New Answer View All Answers
What is the role of the jdbc drivermanager class?
What is the use of getGeneratedKeys() method in Statement?
How does jdbc driver work?
What protocol does jdbc use?
What is a statement in java?
How to use JDBC to connect Microsoft Access?
What are the different types of lockings in jdbc?
What is drivermanager in java?
List some new features available in jdbc 4.0?
How to set the attribute concurrency in resultset?
List the common jdbc exceptions ?
What are the higher level apis under development on top of jdbc currently?
What is jdbc connection?
Why do we use jdbc?
Which Java and java.sql data types map to my specific database types?