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 new in JDBC 2.0?
Why resultset is used in java?
How can I determine where a given table is referenced via foreign keys?
What is jdbc stand for?
What is the benefit of having jdbcrowset implementation? Why do we need a jdbcrowset like wrapper around resultset?
How to make updates to updatable result sets in jdbc?
Give steps to connect to the db using jdbc?
What is jdbc thin client in oracle?
How can we retrieve the file in the oracle database?
What is database connection pooling? Advantages of using a connection pool?
What are the three basic components of the odbc architecture?
What is the feature of jdbc v4?
How to check jdbc driver version in sql server?
What is a rollback in jdbc?
What is in term of jdbc a datasource?