library(DBI)
con <- dbConnect(RSQLite::SQLite(), ":memory:")
dbExecute(con, "ATTACH ':memory:' AS foo")
#> [1] 0
dbWriteTable(con, Id(schema = "foo", table = "df"), iris)
nrow(dbReadTable(con, Id(schema = "foo", table = "df")))
#> [1] 150
dbExistsTable(con, Id(schema = "foo", table = "df"))
#> [1] FALSE
Created on 2019-02-09 by the reprex package (v0.2.1.9000)
Created on 2019-02-09 by the reprex package (v0.2.1.9000)