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   interview questions urls   External Links  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories  >>  Software  >>  Java J2EE  >>  Java Related  >>  JDBC
 
 


 

 
 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
What is the use of prepared statement?Ans:used to execute 
pre compiled statement...so the question is when that 
precompiled statement will be execute or 
comiple?................
 Question Submitted By :: Info_vijaykumar
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is the use of prepared statement?Ans:used to execute pre compiled statement...so the question is when that precompiled statement will be execute or comiple?................
Answer
# 1
It’s just pre compile SQL while run time it’s execute query.
 
Is This Answer Correct ?    0 Yes 1 No
Syed Sadhik
 
  Re: What is the use of prepared statement?Ans:used to execute pre compiled statement...so the question is when that precompiled statement will be execute or comiple?................
Answer
# 2
prepared statement work same as the statement,but there r
some differences.

wen u submitting the query first time following things happened
1)compiling the query
2)executing the query
3)sending results back to the program

2nd time onwards
1)executing the query directly
2) sending results back to the program
 
Is This Answer Correct ?    0 Yes 1 No
Anjani Kumar Jha
 
 
 
  Re: What is the use of prepared statement?Ans:used to execute pre compiled statement...so the question is when that precompiled statement will be execute or comiple?................
Answer
# 3
Prepared statements are used due to its 2 advantages.

Advantages:
1) We can give dynamic values.
2) The statement will be compiled only once, it need not be 
compiled each & every time we give new values.
 
Is This Answer Correct ?    1 Yes 0 No
Nagashree
 
  Re: What is the use of prepared statement?Ans:used to execute pre compiled statement...so the question is when that precompiled statement will be execute or comiple?................
Answer
# 4
when we sent a sql stmt in to oracle sever the server 
splits statemts in to mutiple stmts, checks wheather valid 
or not, if it is valid it is stored in the shared pool,
 where as in the normal stmt parsing will be done every time
in prepared parsing will be done only once, naxt time 
onwards values will be sent to the place holders
 
Is This Answer Correct ?    1 Yes 0 No
Suri
 

 
 
 
Other JDBC Interview Questions
 
  Question Asked @ Answers
 
i have 1000 records in resultset, how to get first 100 records from resultset, because resultset fetch all 1000 records at a time? HSBC7
How to find the column count in resultset? Wipro1
How to get the data from a table into a buffer?  1
What does Class.forName return? IBM5
Which Driver is preferable for using JDBC API in Applets?  1
what is call level interface?  1
In JDBC, All the API?s are interfaces? Where is the actual implementation? HCL2
How is database middleware used to access legacy databases?  1
r u used any design patterns in your project? Wipro3
What type of driver called is pure Java driver? Vertex3
Is there any limitation for no of statments executed with in batchupdate? HSBC1
How many types of JDBC drivers are there and what are they?  1
Explain the sequence of steps to connect to the database? Wipro2
How can you tune SQL statements? Wipro1
how to retrieve sql exceptions Bosch1
what is rowset? Marlabs2
Statement, PrepareStatement and Callable all these are interfaces. Thought it is a interface how come we are creating objects and calling methods("preparestatement()") in it. In which class this method is defined. Please let me know. Thanks in advance. example: PreparedStatement pre = con.prepareStatement( "UPDATE COFFEES SET SALES = ? WHERE COF_NAME LIKE ?");  2
Difference between Generic Servlet and HTTP Servlet?  5
what does the method Class.forName returns? Siemens4
How the information about db(database) can be retrieved?  3
 
For more JDBC Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

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