Answer Posted / rashmi
there are 3 types of statements used in jdbc
------
1.createStatement()
2.preparedStatement()
3.callableStatement()
createStatement returns the object of statement.through this we can call methods belongs
to the statement interface.preparedStatement returns the object of preparedstatement.through this we can call methods belongs
to the preparedstatement interface.
The difference b/w statement and preparedstatement is :
if we use statement the sql querry parses by the database server each and every time.when
we send the request. but by using preparedstatement the sql querry parses only once and that
parsed querry is used every time.
for example if there are 100 sql statements by using statement 100 parsings are necessary.
but by using preparedStatement the parsing is happened only once.so we can save the 99 parsings.
The callablestatement is used to call the storedprocedures.
| Is This Answer Correct ? | 15 Yes | 4 No |
Post New Answer View All Answers
List some new features available in jdbc 4.0?
Give an example of code used for setting up connection with a driver.
Discuss the significances of jdbc.
How to rollback a JDBC transaction?
What are the three parts of a jdbc url?
How many ways that we can view a result set?
How can you make a connection?
What is difference between java.util.Date and java.sql.Date?
Why do we use jdbc in java?
What is JDBC Connection isolation levels?
Explain the difference between inner and outer join ?
Explain the role of driver in jdbc.
Does jdbc use odbc?
please tell me the name and url path for type-4 driver ?
What is the use of the statement in jdbc?