:: 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 (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 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 ?    14 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
Is it possible to create Userdefined Unchecked Exception also?If Yes, give an example? ADP 2
Can a double value be cast to a byte?   3
where final and static variable stored?   3
what are the methods of an object class?   3
what do you meant by Runtime Polymorphism? Persistent 13
What is the life cycle of an Applet ?   1
what is webservices Mind-Tree 5
Hi Friends, I am new to java. Can u explain about thread concept.How i know one thread is locked, and how can i force or acquire another thread for lock . Finally how to know thread is released from lock. Explain types of lock(like method level and block level) in thread.   1
What is the difference between a public and a non-public class?   2
What are access modifiers in Java ?   6
how to pass the parameters to applets?   1
What is a method ?   6
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.   ::