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
Explain about multiple implementations and drive manager?
When do we use execute method in java jdbc?
Why do we use jdbc in java?
What are the different types of locking in JDBC?
State the different connection methods used for creating different types of sql.
What is represented by the connection object?
What are types of jdbc drivers?
What is the significance of DataBaseMetaData.tableIndexStatistics? How to obtain and use it?
How can you make the connection using jdbc?
Why do we need a jdbcrowset like wrapper around resultset?
What is ODBC and JDBC? How do you connect the Database?
How do I write Greek ( or other non-ASCII/8859-1 ) characters to a database?
Is jdbc an api?
What are the differences between execute, executequery, and executeupdate?
Why we use jdbc instead of odbc?