--- title: "execute Method () | Microsoft Docs" ms.custom: "" ms.date: "01/19/2017" ms.prod: sql ms.prod_service: connectivity ms.reviewer: "" ms.technology: connectivity ms.topic: conceptual apiname: - "SQLServerPreparedStatement.execute ()" apilocation: - "sqljdbc.jar" apitype: "Assembly" ms.assetid: fa96d0f8-101b-422f-a767-405be9a5f74f author: David-Engel ms.author: v-daenge --- # execute Method () [!INCLUDE[Driver_JDBC_Download](../../../includes/driver_jdbc_download.md)] Runs the SQL statement in this [SQLServerPreparedStatement](../../../connect/jdbc/reference/sqlserverpreparedstatement-class.md) object, which can be any kind of SQL statement. ## Syntax ``` public boolean execute() ``` ## Return Value **true** if the statement returns a result set. **false** if it returns an update count or no result. ## Exceptions [SQLServerException](../../../connect/jdbc/reference/sqlserverexception-class.md) ## Remarks This execute method is specified by the execute method in the java.sql.PreparedStatement interface. ## See Also [execute Method (SQLServerPreparedStatement)](../../../connect/jdbc/reference/execute-method-sqlserverpreparedstatement.md) [SQLServerPreparedStatement Members](../../../connect/jdbc/reference/sqlserverpreparedstatement-members.md) [SQLServerPreparedStatement Class](../../../connect/jdbc/reference/sqlserverpreparedstatement-class.md)