Tuesday, May 22, 2007

What is the difference between executeQuery () and executeUpdate()?

The difference between executeQuery and executeUpdate is that executeUpdate is for executing statements that change data in the database. For example, use executeUpdate to execute a CREATE an INSERT or an UPDATE statement. executeUpdate returns an int, and the value of that int corresponds to the number of records that were modified. While executeQuery() method is used for executing SQL statements and it returns ResultSet object.



Interview Questions On Java,Java EE Copyright © 2016. Reads: best tracker