Insert new rows or update existing rows to a specific table according to a specific column (unique) by each row

dbInsertUpdateByRow(con, table, data, unique_col = "name")

Arguments

con

A connection object as produced by dbConnect

table

The target table name

data

A data frame to write into table

unique_col

A character vector to indentify each row in the table