powered by
dbExistsTable() returns a logical that indicates if a table exists, dbListTables() lists all tables as a character vector.
dbExistsTable()
dbListTables()
# S4 method for SQLiteConnection,character dbExistsTable(conn, name, ...)# S4 method for SQLiteConnection dbListTables(conn, ...)
# S4 method for SQLiteConnection dbListTables(conn, ...)
An existing '>SQLiteConnection
'>SQLiteConnection
String, name of table. Match is case insensitive.
Needed for compatibility with generics, otherwise ignored.
The corresponding generic functions DBI::dbExistsTable() and DBI::dbListTables().
DBI::dbExistsTable()
DBI::dbListTables()
# 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