A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
OCA Java SE 8 Programmer I Study Guide
this week in the
JDBC and Relational Databases
execute() vs executeUpdate()
Joined: Aug 01, 2006
Aug 31, 2006 09:37:00
May I know what is the difference betweet execute() and executeUpdate().
As far as I know executeUpdate() dont support select statements. execute() supporots all.
If any, please let me know.
Joined: Dec 06, 2005
Aug 31, 2006 18:42:00
Another main difference in these execute() methods is about returning the value by execute these methods.
execute() It returns boolean value
executeQuery() it returns resultset
executeUpdate() It returns integer
How To Ask Questions On JavaRanch
Joined: Oct 23, 2005
Aug 31, 2006 20:37:00
Generally speaking you almost always use executeUpdate or executeQuery since execute() by itself does not give you much information. I'd recommend consulting the APIs for more details.
[OCA 8 Book]
I agree. Here's the link:
subject: execute() vs executeUpdate()
Is there any difference between executeUpdate and execute?
diff bw execute and executeUpdate()
What is the difference between executeUpdate and execute?
statement insertion problem
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015