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 different types of classes in the api component?
Is jdbc a protocol?
What is addbatch jdbc?
What is jdbc architecture in java?
What are the differences between setmaxrows(int) and setfetchsize(int)?
How can I connect mysql or oracle with java?
What are jdbc and its components?
What is a rollback in jdbc?
How does a file store compare with a jdbc store?
What is jdbc type?
What are the packages are used in jdbc?
What are the advantages of collection pools?
Prepared statements are faster. Why?
How to achieve JDBC Connection Pooling using JDBC DataSource and JNDI in Apache Tomcat Server?
How do I know which jdbc driver to use?