This method returns the number of rows that were added, deleted, or updated by a data manipulation statement.
An object inheriting from DBIResult.
Other arguments passed on to methods.
dbGetRowsAffected() returns a scalar number (integer or numeric),
the number of rows affected by a data manipulation statement
The value is available directly after the call
and does not change after calling
For queries issued with
zero is returned before
and after the call to
Attempting to get the rows affected for a result set cleared with
dbClearResult() gives an error.
con <- dbConnect(RSQLite::SQLite(), ":memory:") dbWriteTable(con, "mtcars", mtcars) rs <- dbSendStatement(con, "DELETE FROM mtcars") dbGetRowsAffected(rs)#>  32nrow(mtcars)#>  32