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 execute(), executeUpdate() and executeQuery()
methods?

Answer Posted / ratheesh.a

executeQuery(): This is a method/function used in jdbc
programs. this method will return a 'Resulset' object.
Through this method we can access the result of the query
Usually the Select query is used here..




executeUpadte(): This method is mainly used for updating
queries.. such as 'insert,update,delete' etc... returns an
integer value which shows how many rows are updated...


execute() :What ever the sql queries we are giving in the
other 2 methods can also be include here
This will return a boolean value if it returns 'true' means
query executed successfuly else not..

Is This Answer Correct ?    4 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is DML?

994


What do you mean by odbc?

1015


What are the benefits of PreparedStatement over Statement?

1002


What is addbatch jdbc?

1023


Explain the process of creating tables using NetBeans IDE?

967


What is difference between java.util.Date and java.sql.Date?

1103


Why we use jdbc instead of odbc?

970


How to achieve JDBC Connection Pooling using JDBC DataSource and JNDI in Apache Tomcat Server?

1016


What is the fastest type of JDBC driver?

1053


How many ways that we can view a result set?

987


How can I write to the log used by DriverManager and JDBC drivers?

993


Why should we close database connections in java?

1131


Where can I find ojdbc14 jar file?

990


Is there another way of dealing with the result set that could execute faster?

1003


What class.forname will do while loading drivers of jdbc?

934