executeUpdate (java.lang.String) メソッド

与えられたSQL文を実行します。これは INSERT文、 UPDATE文、 MERGE文、または DELETE 文のいずれかです。または何も返さないSQL文(例えばSQL DDL文)も含まれます。

構文

public final int executeUpdate(java.lang.String sql)

パラメーター

sql

SQL ステートメントを含む文字列です。

戻り値

影響を受けた行数を示す int です。DDL ステートメントを使用している場合は 0 です。

例外

SQLServerException

解説

この executeUpdate メソッドは、java.sql.PreparedStatement インターフェイスの executeUpdate メソッドで規定されています。

SQLServerPreparedStatement オブジェクトが作成される際、オブジェクトの SQL ステートメントが指定されるため、このメソッドを呼び出すと例外が発生します。

参照

executeUpdate メソッド (SQLServerPreparedStatement)

SQLServerPreparedStatement のメンバー

SQLServerPreparedStatement クラス