Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

When do we use execute method in java jdbc?

995


Which is better odbc or jdbc?

1000


Which package is used for jdbc application?

984


What do you mean by metadata and why we are using it?

1029


What do you understand by jdbc datasource?

1032


How do I stop nullpointerexception?

982


What is jdbc and its advantages?

1065


How to rollback a JDBC transaction?

1100


What do you mean by jdbc batch processing and what are the advantages of using jdbc batch processing?

991


What is use of connection pooling?

967


What is jdbc odbc in java?

1097


Describe how the jdbc application works.

1030


How does jdbc connect to database?

888


What is JDBC ResultSet?

1151


What is isolation level? How to set it?

2218