DBI (version 0.3.0)

dbReadTable: Copy data frames to and from database tables.

Description

dbReadTable: database table -> data frame; dbWriteTable: data frame -> database table.

Usage

dbReadTable(conn, name, ...)

dbWriteTable(conn, name, value, ...)

Arguments

conn
A DBIConnection object, as produced by dbConnect.
name
A character string specifying a DBMS table name.
...
Other parameters passed on to methods.
value
a data.frame (or coercible to data.frame).

Value

  • a data.frame.

See Also

Other connection methods: dbDisconnect; dbExistsTable; dbGetException; dbGetQuery, dbGetQuery,DBIConnection,character-method; dbListFields; dbListResults; dbListTables; dbRemoveTable; dbSendQuery

Examples

Run this code
if (require("RSQLite")) {
con <- dbConnect(RSQLite::SQLite(), ":memory:")

dbWriteTable(con, "mtcars", mtcars[1:10, ])
dbReadTable(con, "mtcars")

dbDisconnect(con)
}

Run the code above in your browser using DataCamp Workspace