:: Home Page            
 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                      
Categories >> Software >> Java Related >> Java J2EE >> JDBC


 Core Java interview questions  Core Java Interview Questions (1722)
 Advanced Java interview questions  Advanced Java Interview Questions (331)
 Swing interview questions  Swing Interview Questions (44)
 EJB interview questions  EJB Interview Questions (134)
 Servlets interview questions  Servlets Interview Questions (255)
 Struts interview questions  Struts Interview Questions (196)
 JDBC interview questions  JDBC Interview Questions (187)
 JMS interview questions  JMS Interview Questions (9)
 SunOne interview questions  SunOne Interview Questions (3)
 J2EE interview questions  J2EE Interview Questions (71)
 Weblogic interview questions  Weblogic Interview Questions (147)
 Websphere interview questions  Websphere Interview Questions (14)
 Java Networking interview questions  Java Networking Interview Questions (20)
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions (87)
What are the different types of statements?
 Question Submitted By :: JDBC
I also faced this Question!!     Answer Posted By  
# 1
Statement interface----createStatement() method is useful
to create statement object and to execute simple queries...

PreparedStatement interface---derived from the Statement
interface...preparestatement() method used to create
preparedstatement object and used to execute queries with
unknown parameters or where in the parameters are provided
at the run-time

CallabaleStatement interface----derived from the
preparedstatement interface and helpful in executing stored
procedures...prepareCall() method is used to create the
callabalestatement object
Is This Answer Correct ?    45 Yes 6 No
# 2
callable sattement
Is This Answer Correct ?    29 Yes 9 No
# 3
there are 3 types of statements used in jdbc

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 we can save the 99 parsings.

The callablestatement is used to call the storedprocedures.
Is This Answer Correct ?    15 Yes 3 No
# 4
There are four types of statements(not no which). 
Is This Answer Correct ?    8 Yes 14 No

Other JDBC Interview Questions
  Question Asked @ Answers
JDBC Drivers properties? Infosys 1
What is the latest version of JDBC? What new features are added?   4
How we say that PreparedStatment is Precompiled? where it will be compiled? Logica-CMG 4
what is the current version of JDBC? and explain its features?   3
How a driver can be loaded?   1
how we can remove hard code in java? Satyam 1
Difference between servlet and applet method?   3
Explain the different ways to register a driver?   2
Can we use the one instance of Statment to execute more than one query ? TCS 2
How to get the data from a table into a buffer?   2
why are using type4 driver in realtime projects?   4
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
For more JDBC Interview Questions Click Here 

Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
Copyright 2013  All Rights Reserved.   ::