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
Why is jdbc used?
What happens if we don't close the connection in jdbc?
Give an example for getXXX method?
Does jdbc use ssl?
What is db client?
What is jdbc and its types?
What is the reason why we need a jdbcrowset like the wrapper around resultset?
How can we retrieve data from the resultset?
What is the difference between client and server database cursors?
What is jdbc and explain jdbc architecture?
What is data source in java?
What is jdbc in java?
What are jdbc and its components?
How to get the Database server details in java program?
Does jdbc require oracle client?