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 the process of creating tables using NetBeans IDE?

1016


What happens if connection is not closed in jdbc?

1026


What are the advantages of collection pools?

1104


Describe odbc?

1021


How do I load a database driver with JDBC 4.0 / Java 6?

1029


Differentiate between a statement and a preparedstatement.

1108


Which jdbc driver type s is are the jdbc odbc bridge?

929


What are the different types of statements in jdbc?

968


How can we retrieve the file in the oracle database?

1017


What are the advantages of database connection pooling?

965


What does the jdbc resultsetmetadata interface?

997


Why we use jdbc instead of odbc?

1036


What are the steps to connect to the database in java?

1035


What is transaction processing in jdbc?

1050


Which jdbc driver is the fastest driver?

1062