Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Collapse the table of content
Expand the table of content
Expand Minimize

executeQuery Method (SQLServerStatement)

Runs the given SQL statement and returns a single SQLServerResultSet object.

public java.sql.ResultSet executeQuery(java.lang.String sql)


A String that contains an SQL statement.

A SQLServerResultSet object.

This executeQuery method is specified by the executeQuery method in the java.sql.Statement interface.

SQLServerException is thrown if the given SQL statement produces anything other than a single SQLServerResultSet object.

If executing a stored procedure results in an update count that is greater than one, or that generates more than one result set, use the execute method to execute the stored procedure.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft