--- title: "executeUpdate 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.executeUpdate ()" apilocation: - "sqljdbc.jar" apitype: "Assembly" ms.assetid: ca534c6b-ef4d-4ae8-8cc3-514728623cff author: David-Engel ms.author: v-daenge --- # executeUpdate 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 must be an SQL INSERT, UPDATE, MERGE, or DELETE statement; or an SQL statement that returns nothing, such as a DDL statement. ## Syntax ``` public int executeUpdate() ``` ## Return Value An **int** that indicates the number of rows affected, or 0 if using a DDL statement. ## Exceptions [SQLServerException](../../../connect/jdbc/reference/sqlserverexception-class.md) ## Remarks This executeUpdate method is specified by the executeUpdate method in the java.sql.PreparedStatement interface. ## See Also [executeUpdate Method (SQLServerPreparedStatement)](../../../connect/jdbc/reference/executeupdate-method-sqlserverpreparedstatement.md) [SQLServerPreparedStatement Members](../../../connect/jdbc/reference/sqlserverpreparedstatement-members.md) [SQLServerPreparedStatement Class](../../../connect/jdbc/reference/sqlserverpreparedstatement-class.md)