con <- dbConnect(RSQLite::SQLite(), ":memory:")
dbWriteTable(con, "cars", head(cars, 3))
rs <- dbSendStatement(con,
"INSERT INTO cars (speed, dist) VALUES (1, 1), (2, 2), (3, 3);")
dbHasCompleted(rs)
dbGetRowsAffected(rs)
dbClearResult(rs)
dbReadTable(con, "cars") # there are now 6 rows
dbDisconnect(con)
Run the code above in your browser using DataLab