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   To Refer this Site to Your Friends   Click Here
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
what is difference between excute query ()and execute update
()?
 Question Submitted By :: Gopalraop
I also faced this Question!!     Rank Answer Posted By  
 
  Re: what is difference between excute query ()and execute update ()?
Answer
# 1
execute query() used in select operation.
execute update() is used in delete, update and insert 
operations.
 
Is This Answer Correct ?    5 Yes 0 No
Mano
 
  Re: what is difference between excute query ()and execute update ()?
Answer
# 2
execute query() returns a single resultset object.
exceute update() excecutes the insert, update and the delete
operation of the sql statement.This returns the integer
value or say the number of record affected by the SQL
statement execution.
 
Is This Answer Correct ?    5 Yes 0 No
Ashwani
 
 
 
  Re: what is difference between excute query ()and execute update ()?
Answer
# 3
executeQuery() is used to perform DDL operation like 
(create,alter) while executeUpdate() is used to perform DML 
operation like (insert/update/delete).
 
Is This Answer Correct ?    2 Yes 1 No
Gambhir
 
  Re: what is difference between excute query ()and execute update ()?
Answer
# 4
excuteQuery() its method used perform select query and 
delete query return ResultSet object.
 excuteUpdate() used to perform DML operation return type 
int
 
Is This Answer Correct ?    2 Yes 0 No
Vikneswarank
[Jadian]
 
  Re: what is difference between excute query ()and execute update ()?
Answer
# 5
Execute query():it is using for DML(Data definition
language) and DDL (Data Manipulation Language)and mainly its
used for select query 
example:String sql="select * from Employee_Details";
        st.executequery(sql);

Execute update():it is using for DML(Data definition
language) and DDL (Data Manipulation Language)and mainly its
used for insert query,update query,delete
example:String sql="insert into Employee_Detail........";

        st.executeUpdate(sql);
 
Is This Answer Correct ?    0 Yes 0 No
Megala Devi
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
How many objects are created for a singleton class Ness-Technologies4
What is static binding and where it occurs?  2
How multi processing is achieved in JAVA? BMC4
What are Advatages of Overloading and Overridding. TCS3
What is the argument type of main() method?  2
transaction attributes ?  2
What is the GregorianCalendar class? HCL1
what is request dispatcher and how does it work? CTS1
In C we use only compiler. Why java uses both compiler and interpreter? What is its significance?  5
y cant i declare method like public final static show()  2
can u give one sinario when you use Abstract Class and When you use Interface. ITC-Infotech5
What is an enumeration class?  2
How to deprecate a method? Show it with proper example. Plz give the answer of this.Thanx in advance. mail me: tanzeem.akhtar@gmail.com  1
What is user defined exception?  4
Hi Friends, can u give code to convert ArrayList to HashMap and HashMap to ArrayList.  1
Define interface?  2
what is struts-config-xml?and its use?  3
How to validate the request (Eg:user name and password) in session(http session)? not in LDAP server ? Saksoft1
What is a package?  2
Which One is optimal to choose ? Syncronized hash map or Hash table with single thread model? How can a hash map syncronized with out using syncrozed blocks in programm? Four-soft3
 
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