Learn R Programming

RSQLite (version 1.1-1)

dbExistsTable,SQLiteConnection,character-method: Tables in a database

Description

dbExistsTable() returns a logical that indicates if a table exists, dbListTables() lists all tables as a character vector.

Usage

# S4 method for SQLiteConnection,character
dbExistsTable(conn, name, ...)

# S4 method for SQLiteConnection dbListTables(conn, ...)

Arguments

conn

An existing '>SQLiteConnection

name

String, name of table. Match is case insensitive.

...

Needed for compatibility with generics, otherwise ignored.

See Also

The corresponding generic functions DBI::dbExistsTable() and DBI::dbListTables().

Examples

Run this code
# NOT RUN {
library(DBI)
db <- RSQLite::datasetsDb()

dbExistsTable(db, "mtcars")
dbExistsTable(db, "nonexistingtable")
dbListTables(db)

dbDisconnect(db)
# }

Run the code above in your browser using DataLab