ALLInterview.com :: 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                      
Google
   
 
Categories >> Software >> Java Related >> Java J2EE >> Core Java
 
 


 

 
 Core Java interview questions  Core Java Interview Questions (1720)
 Advanced Java interview questions  Advanced Java Interview Questions (331)
 Swing interview questions  Swing Interview Questions (43)
 EJB interview questions  EJB Interview Questions (134)
 Servlets interview questions  Servlets Interview Questions (255)
 Struts interview questions  Struts Interview Questions (195)
 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 (145)
 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)
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 ?    9 Yes 1 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 ?    13 Yes 1 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 ?    6 Yes 2 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 ?    5 Yes 1 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 ?    1 Yes 0 No
Megala Devi
 
  Re: what is difference between excute query ()and execute update ()?
Answer
# 6
executeQuery() method used for only selecting the records
and its return value is in the form of ResultSet Object.

executeUpdate() method used for DDL and DML commands and
its returns the int value.
 
Is This Answer Correct ?    0 Yes 0 No
Naresh
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
1.what is the exact difference between applet and frame? 2.Do we use main method in frames?   4
What is the difference between Trusted and Untrusted Applet ? IBM 2
what is use of session tracking ?with example? Photon 1
How GUI component handle its own events?   1
What is HashTable?   4
What is constructor Tech-Mahindra 9
JVM is platform independent or depeneded?   7
what is the difference between System.exit() and System.exit(1)? eClinical-Solutions 1
How we get some middle records in one table? 3i-Infotech 1
What is the Vector class?   3
why we cannot declare static variable inside a static method   4
Different types of Layouts?   11
 
For more Core Java Interview Questions Click Here 
 
 
 
 
 


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

ALLInterview.com   ::  KalAajKal.com