dbListTables: List remote tables

Description Usage Arguments Value See Also Examples

Description

Returns the unquoted names of remote tables accessible through this connection. This should include views and temporary objects, but not all database backends (in particular RMariaDB and RMySQL) support this.

\Sexpr[results=rd,stage=render]{DBI:::methods_as_rd("dbListTables")}

Usage

1

Arguments

conn

A DBIConnection object, as returned by dbConnect().

...

Other parameters passed on to methods.

Value

dbListTables() returns a character vector that enumerates all tables and views in the database. Tables added with dbWriteTable() are part of the list, including temporary tables if supported by the database. As soon a table is removed from the database, it is also removed from the list of database tables.

The returned names are suitable for quoting with dbQuoteIdentifier(). An error is raised when calling this method for a closed or invalid connection.

See Also

Other DBIConnection generics: DBIConnection-class, dbAppendTable, dbCreateTable, dbDataType, dbDisconnect, dbExecute, dbExistsTable, dbGetException, dbGetInfo, dbGetQuery, dbIsReadOnly, dbIsValid, dbListFields, dbListObjects, dbListResults, dbReadTable, dbRemoveTable, dbSendQuery, dbSendStatement, dbWriteTable

Examples

1
2
3
4
5
6
7
con <- dbConnect(RSQLite::SQLite(), ":memory:")

dbListTables(con)
dbWriteTable(con, "mtcars", mtcars)
dbListTables(con)

dbDisconnect(con)

Example output

character(0)
[1] "mtcars"

DBI documentation built on May 2, 2018, 5:04 p.m.