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       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 execute(), executeUpdate() and executeQuery() 
methods?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is execute(), executeUpdate() and executeQuery() methods?
Answer
# 1
execute() - will do the querying the database & also the 
update,insert,delete on the database. 

executeUpdate() - only the update,insert,delete on the 
database.

executeQuery() - only the querying the database.
 
Is This Answer Correct ?    1 Yes 0 No
Srinivasan
 
  Re: What is execute(), executeUpdate() and executeQuery() methods?
Answer
# 2
execute()- is for invoking the functions or stored 
procedures of SQL by the CallableStatement.

executeUpdata()- is for the operations such as insert, 
update or delete on SQL by PreparedStatement, Statement.

executeQuery() - is for operation select of Sql by 
PreparedStatement or Statement.
 
Is This Answer Correct ?    3 Yes 1 No
Bhoopesh Alladi
 
 
 
  Re: What is execute(), executeUpdate() and executeQuery() methods?
Answer
# 3
executeUpdate() is for non selecting statements
executeQuery() is for selecting statements.
 
Is This Answer Correct ?    1 Yes 0 No
Sree
 

 
 
 
Other JDBC Interview Questions
 
  Question Asked @ Answers
 
When you will get error like ?No suitable driver??  1
what is CallableStatement and what is its usage?  1
Without using of Class.forName(? ?), how do you connect to db? IBM1
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
how to retrieve sql exceptions Bosch1
What is JDBC?  1
What are the Isolation level in JDBC transaction?  1
What are pros and cons of using of Type-2 and Type-4 Drivers over Type-1 driver? IBM4
Is there any limitation for no of statments executed with in batchupdate? HSBC2
What are the Normalization Rules?  1
Difference between JDBC and Hibernate? Give one sample based on the variance? IBM1
what is connection pooling? Wipro6
what is callable statement? Infogain5
How to find total column from a resultset? tsys5
How many isolation levels are supported in JDBC and what are they?  1
r u used any design patterns in your project? Wipro3
What is an outer join? Infogain1
What is static Synchronized method in JDBC API? Give an example? R-Systems1
write down exceptions those appear in java programs when u write JDBC Programs?  2
What is the difference between Minus, and Intersect?  1
 
For more JDBC 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