Skip to content

Latest commit

 

History

History
47 lines (34 loc) · 2.03 KB

executeupdate-method-java-lang-string-sqlserverstatement.md

File metadata and controls

47 lines (34 loc) · 2.03 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic apilocation apiname apitype
executeUpdate Method (java.lang.String) (SQLServerStatement)
executeUpdate Method (java.lang.String) (SQLServerStatement)
David-Engel
v-davidengel
01/19/2017
sql
connectivity
reference
sqljdbc.jar
SQLServerStatement.executeUpdate (java.lang.String)
Assembly

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