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
Can we have foreign key reference to a non primary key column ?
In which ways is driver class is registered with drive manager?
What are the measures to connect to the db using jdbc?
How the JDBC application works?
How can you know about drivers and database information ?
How will you perform truncation using JDBC?
What are the 4 types of jdbc drivers?
Explain the main method?
What does executequery return in java?
What are four types of JDBC driver?
How do I receive a ResultSet from a stored procedure?
Explain the difference between rowset vs. Resultset in jdbc?
What are the benefits of PreparedStatement over Statement?
Explain the two tier and three tier architecture of jdbc.
What is the feature of jdbc v4?