what is difference between excute query ()and execute update
()?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
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 |
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 |
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 |
What do you understand by the term singleton?
What is the difference between preparedstatement and statement in java?
Explain about member inner classes?
What do you mean by Hash Map and Hash Table?
What does n mean?
When is an object subject to garbage collection?
What is the purpose of main function in java?
What is data movement?
What is byte value?
What is a Hash Table? What are the advantages of using a hash table?
What is the difference between static and global variables and also define what are volatile variables?
0 Answers Flextronics, Hexaware,
What is difference between array and arraylist in java?