:: 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 >> Core Java


 Core Java interview questions  Core Java Interview Questions (1721)
 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 (146)
 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 is difference between excute query ()and execute update
 Question Submitted By :: Core-Java
I also faced this Question!!     Answer Posted By  
# 1
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
# 2
execute query() used in select operation.
execute update() is used in delete, update and insert
Is This Answer Correct ?    9 Yes 1 No
# 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
# 4
excuteQuery() its method used perform select query and
delete query return ResultSet object.
excuteUpdate() used to perform DML operation return type
Is This Answer Correct ?    5 Yes 1 No
# 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";

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........";

Is This Answer Correct ?    1 Yes 0 No
Megala Devi
# 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

Other Core Java Interview Questions
  Question Asked @ Answers
What is meant by serialisation and deserialisation?   4
How Marker Interfaces are instruct to complete the desired need ?   2
What are different types of Exceptions?.   9
What is finally in exception handling?   7
why java does not support mulitple inheritance directly? TCS 2
What primitive Java types? Howmany are they and what are their names?   3
In what circumstances, compiler will supply a default constructor for a class?   4
When we will use an Interface and Abstract class?   9
write a program to create an arraylist and listeterator.and value should be enter through keyboard. Axcend 1
what is the difference between the "protected and default" modifiers?   8
Is it compulsory to have atleast one abstract method in abstract class?   10
difference between java ,c#&java,c++   3
For more Core Java Interview Questions Click Here 

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