Skip to content

Latest commit

 

History

History
56 lines (43 loc) · 2.16 KB

File metadata and controls

56 lines (43 loc) · 2.16 KB
title executeUpdate Method (java.lang.String) (SQLServerStatement) | Microsoft Docs
ms.custom
ms.date 01/19/2017
ms.prod sql
ms.prod_service connectivity
ms.reviewer
ms.suite sql
ms.technology connectivity
ms.tgt_pltfrm
ms.topic conceptual
apiname
SQLServerStatement.executeUpdate (java.lang.String)
apilocation
sqljdbc.jar
apitype Assembly
ms.assetid 85e7c3a2-f2da-49bf-9d90-5fd246fd60e1
caps.latest.revision 13
author MightyPen
ms.author genemi
manager craigg

executeUpdate Method (java.lang.String) (SQLServerStatement)

[!INCLUDEDriver_JDBC_Download]

Runs the given SQL statement, which can be an INSERT, UPDATE, or DELETE statement; or an SQL statement that returns nothing, such as an SQL DDL statement. Beginning in [!INCLUDEmsCoName][!INCLUDEssNoVersion] JDBC Driver 3.0, executeUpdate will return the correct number of rows updated in a MERGE operation.

Syntax

  
public int executeUpdate(java.lang.String sql)  

Parameters

sql

A String that contains the SQL statement.

Return Value

An int that indicates the number of rows affected, or 0 if using a DDL statement.

Exceptions

SQLServerException

Remarks

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

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.

See Also

executeUpdate Method (SQLServerStatement)
SQLServerStatement Members
SQLServerStatement Class