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

Does jdbc use ssl?

896


Give an example for getXXX method?

962


Is jdbc connection secure?

907


What is jdbc odbc driver?

1003


What is in term of jdbc a datasource?

890


What are the different types of interfaces in the api component?

938


What is jsp and jdbc?

875


What is new in JDBC 2.0?

981


How can you make the connection using jdbc?

1000


What is difference between java.util.Date and java.sql.Date?

1057


How do I write Greek ( or other non-ASCII/8859-1 ) characters to a database?

965


What is the difference between jdbc and jndi?

966


What are the types of statements in jdbc?

944


What are the differences between execute, executequery, and executeupdate?

921


What is jdbc url for mysql?

1002