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
RowSetInternal caller and returns void. What can I do in the readData method?
How many ways that we can view a result set?
Which jdbc driver is the fastest driver?
What is @entity in java?
What is the most common example type 1 driver?
What are the advantages of database connection pooling?
How to check jdbc driver version in websphere?
Is jdbc connection secure?
What is the query used to display all tables names in SQL Server (Query analyzer)?
How can we retrieve the file in the oracle database?
How to use JDBC to connect Microsoft Access?
How do java applications access the database using jdbc?
Explain the role of driver in jdbc.
What is a statement?
explain about special characters?