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 are the different types of statements?

Answer Posted / rashmi

there are 3 types of statements used in jdbc
------
1.createStatement()
2.preparedStatement()
3.callableStatement()


createStatement returns the object of statement.through this we can call methods belongs

to the statement interface.preparedStatement returns the object of preparedstatement.through this we can call methods belongs

to the preparedstatement interface.

The difference b/w statement and preparedstatement is :

if we use statement the sql querry parses by the database server each and every time.when

we send the request. but by using preparedstatement the sql querry parses only once and that

parsed querry is used every time.

for example if there are 100 sql statements by using statement 100 parsings are necessary.

but by using preparedStatement the parsing is happened only once.so we can save the 99 parsings.

The callablestatement is used to call the storedprocedures.

Is This Answer Correct ?    15 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is odbc needed?

913


What happens if we don't close the connection in jdbc?

884


What is jdbc dialect?

932


How to use JDBC API to call Stored Procedures?

1021


What packages are used by jdbc?

950


What is an odbc driver?

913


Does the database server have to be running Java or have Java support in order for my remote JDBC client app to access the database?

976


What causes the "No suitable driver" error?

1064


What class.forname does, while loading the drivers?

970


What is jdbc type?

891


What is odbc. how is it related to sql cli?

1046


Define preparedstatement.

993


Explain the difference between inner and outer join ?

1037


What is SQL Warning? How to retrieve SQL warnings in the JDBC program?

1047


Explain about the drive manager class working?

1117