What is the difference between ExecuteUpdate and
ExecuteQuery?

Answer Posted / balu

executeUpdate() --is used for executing non-select
statements

executeQuery() - is used for executing select statements

The above two are valid in SQLServer
Note: but i think in case of Oracle executequery()may also
accept non-select statements

Is This Answer Correct ?    19 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the directory structure of a war file?

715


What is the purpose of requestdispatcher interface?

616


What do you mean by filter in servlet?

538


What are the different mode that servlets can be used?

557


What is a server side include (ssi)

570






How do you find out what client machine is making a request to your servlet

534


What is meant by a servlet?

607


What is the difference between genericservlet and httpservlet

592


A client sends requests to two different web components. Both of the components access the session. Will they end up using the same session object or different session ?

614


Explain the custom jsp tags and the beans.

617


How servlets are deployed in java?

547


What is a cookie What is the difference between session and cookie

598


How does tomcat servlet container work?

592


Is tomcat a servlet container?

579


What if you need to span your transaction across multiple servlet invocations?

585