db_insert: Function to insert a data frame into/as a database table (R...

View source: R/db_insert.R

db_insertR Documentation

Function to insert a data frame into/as a database table (R data frame to SQL table).

Description

db_insert is a wrapper for dbWriteTable, but uses different defaults. db_insert will not replace data by default.

Usage

db_insert(con, table, df, replace = FALSE)

Arguments

con

Database connection.

table

Table in, or to be created in con.

df

Data frame to be inserted into con.

replace

Should the database table be replaced? Default is FALSE. Be cautious using this argument because it will drop the database table if it exists.

Value

Invisible.

Author(s)

Stuart K. Grange

See Also

dbWriteTable, db_list_variables, db_table_names, db_arrange_variables


skgrange/databaser documentation built on April 21, 2024, 6:30 a.m.