Execute “sp_msforeachdb” in a Java application
If a statement can return no or multiple results, you should not use executeQuery, but execute() instead, this method returns a boolean indicating the type of the first result: true: result is a ResultSet false : result is an update count If the result is true, then you use getResultSet() to retrieve the ResultSet, otherwise … Read more