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 about special characters?
What is the meaning of connection?
How to check jdbc connection in linux?
Where jdbc drivermanager class is used?
What is jdbc architecture in java?
Where is jdbc used?
In which ways is driver class is registered with drive manager?
What are the three parts of a jdbc url?
How we store procedure in oralce for callable statements in jdbc
What is the use of callablestatement? Name the method, which is used to prepare a callablestatement.
What is hbm xml?
How does jdbc work?
What is statement and resultset in jdbc?
What is connection data?
What is JDBC DataSource and what are it’s benefits?