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...

Why is prepared Statement, Callable Statement used for? What
is the need of Batch updates?

Answer Posted / chaitanya

The main feature of a PreparedStatement object is that,
unlike a Statement object, it is given an SQL statement
when it is created. The advantage to this is that in most
cases, this SQL statement is sent to the DBMS right away,
where it is compiled. As a result, the PreparedStatement
object contains not just an SQL statement, but an SQL
statement that has been precompiled. This means that when
the PreparedStatement is executed, the DBMS can just run
the PreparedStatement SQL statement without having to
compile it first.

Callable Statement:A CallableStatement object provides a
way to call stored procedures in a standard way for all
DBMSs. A stored procedure is stored in a database; the call
to the stored procedure is what a CallableStatement object
contains. This call is written in an escape syntax that may
take one of two forms: one form with a result parameter,
and the other without one. A result parameter, a kind of
OUT parameter, is the return value for the stored
procedure. Both forms may have a variable number of
parameters used for input (IN parameters), output (OUT
parameters), or both (INOUT parameters). A question mark
serves as a placeholder for a parameter
BatchUpdates:
A batch update is a set of multiple update statements that
is submitted to the database for processing as a batch.
Sending multiple update statements to the database together
as a unit can, in some situations, be much more efficient
than sending each update statement separately. This ability
to send updates as a unit, referred to as the batch update
facility, is one of the features provided with the JDBC 2.0
API.

Is This Answer Correct ?    36 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is java logo a cup of coffee?

1177


You can create a string object as string str = “abc”; why cant a button object be created as button bt = “abc”;? Explain

994


What do you understand by the bean persistent property?

1010


What is the purpose of an interface?

1045


Explain what pure virtual function is?

1027


Write a program to print 15 random numbers using foreach of java 8?

936


What are synchronized methods and synchronized statements in java programming?

1024


Is call by reference possible in java?

967


What is comparator in java?

1004


What are advantages and disadvantages of OOPs?

1140


How to run a JAR file through command prompt?

1281


What is identifier give example?

1035


How many types of equations are there?

1020


what do you understand by synchronization? Or what is synchronization and why is it important? Or describe synchronization in respect to multithreading? Or what is synchronization? : Java thread

951


What is a class object?

975