PreparedStatement is a pre compiled statement but where it's
pre compiled ?
Answer Posted / aravind
Hi,
in prepared statement when u mention the query that time
only statement will be internaly sent to DB and checks for
the query syntax, so when u execute it directly executes
the statement.
PreparedStatement pstmt = conn.prepareStatement("insert
into table (column2) values ("My Value") where id = 1000");
//pstmt is already compiled
pstmt.execute();
| Is This Answer Correct ? | 5 Yes | 7 No |
Post New Answer View All Answers
What are the new features added to JDBC 4.0?
Jdbc-odbc bridge is multi-threaded or not?
Name the method, which is used to prepare a callablestatement.
Differentiate between a statement and a preparedstatement.
What is meant by connection string?
Can resultset be null in java?
What is hbm xml?
Explain about Join?
How does a custom RowSetReader get called from a CachedRowSet?
What causes the "No suitable driver" error?
What are devices?
What is a connection string used for?
What is the use of the statement in jdbc?
Why “no suitable driver” error occurs?
What is JDBC Connection? Explain steps to get Database connection in a simple java program.