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
Differentiate between stored procedure and functions?
What is the role of the jdbc drivermanager class?
What is addbatch jdbc?
List the advantages of using datasource?
Why do we use jdbc?
What is database deadlock ?
What are the jdbc drivers in java?
How can we execute stored procedures?
What is connection pooling and why it is used?
What are the jdbc api components?
What is the full form of jdbc?
What is jdbc odbc connection?
What is jdbc drivers in java?
password, is stored in as plain text. What can I do to protect my passwords?
Explain in detail about JDBC and its general features?