Npgsql Api Docs |

# NpgsqlCommand.ExecuteNonQuery Method

Executes a SQL statement against the connection and returns the number of rows affected.

[Visual Basic]
Overrides Public Function ExecuteNonQuery() As Integer _
Implements IDbCommand.ExecuteNonQuery
[C#]
public override int ExecuteNonQuery();

#### Return Value

The number of rows affected if known; -1 otherwise.

#### Implements

IDbCommand.ExecuteNonQuery

#### See Also

NpgsqlCommand Class | Npgsql Namespace