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
What is an odbc driver?
What is an SQL Locator?
What is jdbc connection class?
Explain about DSN?
What is database deadlock ?
what is the meaning of following code snippets Class c=class.forName(driverClassName); Driver d=(driver)c.newInstance();
What is jdbc dialect?
What is a rollback in jdbc?
What is the meaning of “dirty read” in the database?
What is jdbc thin client?
How do I write Greek ( or other non-ASCII/8859-1 ) characters to a database?
What is the use of dialect?
When does the result for an sql statement return null?
How can we move the cursor in a scrollable result set?
How does a custom RowSetReader get called from a CachedRowSet?