ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
 
Categories  >>  Software  >>  Core Java  >>  Java J2EE  >>  Java Related
 
 


 

 
 Core Java interview questions  Core Java Interview Questions
 Advanced Java interview questions  Advanced Java Interview Questions
 Swing interview questions  Swing Interview Questions
 EJB interview questions  EJB Interview Questions
 Servlets interview questions  Servlets Interview Questions
 Struts interview questions  Struts Interview Questions
 JDBC interview questions  JDBC Interview Questions
 JMS interview questions  JMS Interview Questions
 SunOne interview questions  SunOne Interview Questions
 J2EE interview questions  J2EE Interview Questions
 Weblogic interview questions  Weblogic Interview Questions
 Websphere interview questions  Websphere Interview Questions
 Java Networking interview questions  Java Networking Interview Questions
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions
Question
Why is prepared Statement, Callable Statement used for? What
is the need of Batch updates?
 Question Submitted By :: Gopalraop
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Why is prepared Statement, Callable Statement used for? What is the need of Batch updates?
Answer
# 1
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 ?    8 Yes 1 No
Chaitanya
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
how to compile jsp? Logica-CMG3
how to convert mm/dd/yy to dd/mm/yy using collections in java. Bosch2
How are this and super used?  6
What are init(), start() methods and whey they are called?  2
what is an virtual function TCS2
What is multiple inheritance & can we implement it in java? Satyam4
Marker interface means , interface which has no methods.Then what is the necessity of its usage.I read "it tells the compiler that it should be treated differently ". "It is used to store state of an object". But still am not clear.Please explain clearly.  1
C and C++ has constructors and distructors, why does Java does not have distructors? T3-Softwares1
What is difference between static method and static variable?  6
whst is encapsulation?when u encpsulate actually while devoloping code? AMDOC5
What is the relationship between a method?s throws clause and the exceptions that can be thrown during the method?s execution?  2
Difference between ?System.out.println? and ?System.error.println?? Sai-Softech2
why marker interfaces are there in java Digital-Group3
Can you have a constructor in abstract class?  7
how many types of cloning? Mobily1
Explain Connection Pooling?  3
how session will be expired? Infosys4
What are hot spots in Java programming?  1
what is tempplate pattern RBS4
what is java bean?where can we use it? TCS3
 
For more Core Java Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com