What is the difference between statement.executeQuery and statement.getResultSet(). I believe both will return ResultSet for a select stat
statement.executeQuery
statement.getResultSet()
ResultSet
Check out the JavaDoc for these methods. getResultSet can return null but executeQuery never return null.
getResultSet
executeQuery
There are also more constraints. For example executeQuery cannot be called on a PreparedStatement or CallableStatement.
PreparedStatement
CallableStatement