Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


what is difference between excute query ()and execute update
()?

Answers were Sorted based on User's Feedback



what is difference between excute query ()and execute update ()?..

Answer / ashwani

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 ?    15 Yes 1 No

what is difference between excute query ()and execute update ()?..

Answer / mano

execute query() used in select operation.
execute update() is used in delete, update and insert
operations.

Is This Answer Correct ?    10 Yes 1 No

what is difference between excute query ()and execute update ()?..

Answer / gambhir

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

what is difference between excute query ()and execute update ()?..

Answer / vikneswarank

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

what is difference between excute query ()and execute update ()?..

Answer / megala devi

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 ?    2 Yes 0 No

what is difference between excute query ()and execute update ()?..

Answer / naresh

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

Post New Answer

More Core Java Interview Questions

How to write custom exception in java?

0 Answers   Cyient,


What modifiers are allowed for methods in an interface?

0 Answers  


What are parsing rules?

0 Answers  


What is jvm? How its run?

0 Answers  


How to excute - Interface - Inner class- method can any one tell how to execute/ call this main method public interface abc { static int i=0; void dd(); class a1 { a1() { int j; System.out.println("inside"); }; public static void main(String a1[]) { System.out.println("in interfia"); } } }

1 Answers  


why HashTable not allow null key and value

2 Answers   Crimson Logic,


Sample code to retrieve objects from HashMap in sorted ascending order?

2 Answers  


What are E and PI?

1 Answers  


Can you call a method in a method?

0 Answers  


What is the concept of multithreading?

0 Answers  


Why is singleton not thread safe?

0 Answers  


What is difference between string and new string?

0 Answers  


Categories