one returns a ResultSet and the other does not. If you want a ResultSEt (eg from a query) then use that one.
posted 7 years ago
You may also call Statement.getResultSet() if you choose to use execute() and the statement produces a ResultSet. executeQuery() is a conveience method when running SELECT statements as you of course are looking for a Result set usually in this case.