What is Statement and PreparedStatement? whatz the
difference?
Answer Posted / kalyan
As harish, said prepared statement is pre-complied so it
will be very fast when compared to normal statement.when we
execute same query again and again for different set of
input data.
code snippet for this is :--
for normal statement :
Statement st = conn.createStatement();
for prepared statement :
PreparedStatement prSt = conn.prepareStatement
("query") ;
// set values for input paramenters and execute as usual.
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
Explain the process of creating tables using NetBeans IDE?
What happens if connection is not closed in jdbc?
What are the advantages of collection pools?
Describe odbc?
How do I load a database driver with JDBC 4.0 / Java 6?
Differentiate between a statement and a preparedstatement.
Which jdbc driver type s is are the jdbc odbc bridge?
What are the different types of statements in jdbc?
How can we retrieve the file in the oracle database?
What are the advantages of database connection pooling?
What does the jdbc resultsetmetadata interface?
Why we use jdbc instead of odbc?
What are the steps to connect to the database in java?
What is transaction processing in jdbc?
Which jdbc driver is the fastest driver?