What is execute(), executeUpdate() and executeQuery()
methods?
Answer Posted / trio
boolean execute()
Executes the SQL statement in this PreparedStatement
object, which may be any kind of SQL statement.
ResultSet executeQuery()
Executes the SQL query in this PreparedStatement object and
returns the ResultSet object generated by the query.
int executeUpdate()
Executes the SQL statement in this PreparedStatement
object, which must be an SQL INSERT, UPDATE or DELETE
statement; or an SQL statement that returns nothing, such
as a DDL statement.
| Is This Answer Correct ? | 39 Yes | 4 No |
Post New Answer View All Answers
Is there another way of dealing with the result set that could execute faster?
What is @entity in java?
Explain the difference between rowset vs. Resultset in jdbc?
What is connection commit?
How to achieve JDBC Connection Pooling using JDBC DataSource and JNDI in Apache Tomcat Server?
What is the difference between client and server database cursors?
What do you understand by jdbc driver and explain its types?
What is jdbc connection class?
What is a java driver?
What are the different types of resultset?
When does the result for an sql statement return null?
How do I check in my code whether a maximum limit of database connections have been reached?
Which package is used for jdbc application?
What does the jdbc resultsetmetadata interface?
What is jdbc drivers in java?