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
When do we use execute method in java jdbc?
Which is better odbc or jdbc?
Which package is used for jdbc application?
What do you mean by metadata and why we are using it?
What do you understand by jdbc datasource?
How do I stop nullpointerexception?
What is jdbc and its advantages?
How to rollback a JDBC transaction?
What do you mean by jdbc batch processing and what are the advantages of using jdbc batch processing?
What is use of connection pooling?
What is jdbc odbc in java?
Describe how the jdbc application works.
How does jdbc connect to database?
What is JDBC ResultSet?
What is isolation level? How to set it?