:: 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 (1728)
 Advanced Java interview questions  Advanced Java Interview Questions (332)
 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
What is the syntax of URL to get connection?   1
How to find total column from a resultset? TSYS 6
why we don't use the type 2 driver for connect to the database in jdbc? TCS 1
How warnings are retrieved in JDBC?   1
What are the sailent features of JDBC 2.0?   7
Diff. types of triggers.. Logica-CMG 4
what are the types of result sets in JDBC 3.0 ? HCL 3
How to get a whole row of data at once?   2
How to find number of records in result set?   2
signature of init method?   2
Can you define a foreign key, with a key from the same table? IBM 2
how we can remove hard code in java? Satyam 1
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.   ::