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 is JDBC Statement?
What are the different classes through which JDBC represents statements?
Explain about the drive manager class working?
What is addbatch jdbc?
Can we return resultset in java?
How can you load the drivers?
Why would you use setautocommit(false) in jdbc?
What is CLOB and BLOB datatypes in JDBC?
Is odbc an api?
What are the methods which can verify the cursor particular position?
Which of the attributes in the monitoring tab for a jdbc connection pool in the administrative console tell us how many clients are currently waiting for a connection?
Is jdbc secure?
Can resultset be null in java?
What does jdbc stand for?
What is the use of JDBC DriverManager class?