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
What are the functions of the jdbc connection interface?
Which is better odbc or jdbc?
What is jdbc in dbms?
What is the difference between jdbc and jndi?
What is ojvm used for?
How do I connect to jdbc?
What are the basic exceptions in jdbc?
What are database warnings in jdbc and how can we handle database warnings in jdbc?
How can we move the cursor in a scrollable result set?
How many types of JDBC Drivers are present and what are they?
What are the advantages of collection pools?
Why should we close database connections in java?
What does jdbc stand for?
What is jdbc connection?
What types of DataSource objects are specified in the Optional Package?