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

What are the functions of the jdbc connection interface?

923


Which is better odbc or jdbc?

918


What is jdbc in dbms?

953


What is the difference between jdbc and jndi?

942


What is ojvm used for?

930


How do I connect to jdbc?

875


What are the basic exceptions in jdbc?

1024


What are database warnings in jdbc and how can we handle database warnings in jdbc?

946


How can we move the cursor in a scrollable result set?

896


How many types of JDBC Drivers are present and what are they?

1063


What are the advantages of collection pools?

971


Why should we close database connections in java?

1093


What does jdbc stand for?

882


What is jdbc connection?

1047


What types of DataSource objects are specified in the Optional Package?

953