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

explain about special characters?

974


What is the meaning of connection?

965


How to check jdbc connection in linux?

1031


Where jdbc drivermanager class is used?

962


What is jdbc architecture in java?

946


Where is jdbc used?

975


In which ways is driver class is registered with drive manager?

927


What are the three parts of a jdbc url?

1013


How we store procedure in oralce for callable statements in jdbc

2334


What is the use of callablestatement? Name the method, which is used to prepare a callablestatement.

898


What is hbm xml?

872


How does jdbc work?

885


What is statement and resultset in jdbc?

944


What is connection data?

907


What is JDBC DataSource and what are it’s benefits?

1212