What is the difference between ExecuteUpdate and
ExecuteQuery?

Answer Posted / p.l.n.kumar

ExecuteUpdate is used to execute Insert,Update and
Delete... statements.it's return type is 'int' .

ExecuteQuery is used to execute Select.... statements.It's
return type is 'Resultset' object.

Is This Answer Correct ?    45 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Give an example of code used for setting up connection with a driver.

517


Discuss the significances of jdbc.

517


What are jdbc?

544


Which constraint cannot be specified as an explicit constraint and should be specified with the column only ?

486


What is the execute method in java?

545






How can we execute stored procedures using callablestatement?

467


Give an example for execution of sql statement.

524


What causes no suitable driver error?

542


Why we use while rs next ())?

525


What is odbc jdbc?

535


Where jdbc drivermanager class is used?

526


Which is better jpa or jdbc?

503


What is connection commit?

497


Why should we close database connections in java?

685


How to use JDBC to connect Microsoft Access?

593