table_exists | R Documentation |
This functions attempts to determine the existence of a given table. If a character input is given, matching is done heuristically assuming a "schema.table" notation. If no schema is implied in this case, the default schema is assumed.
table_exists(conn, db_table)
## S3 method for class 'DBIConnection'
table_exists(conn, db_table)
conn |
( |
db_table |
( |
TRUE
if db_table can be parsed to a table found in conn
.
conn <- get_connection()
dplyr::copy_to(conn, mtcars, name = "mtcars", temporary = FALSE)
dplyr::copy_to(conn, iris, name = "iris")
table_exists(conn, "mtcars") # TRUE
table_exists(conn, "iris") # FALSE
table_exists(conn, "temp.iris") # TRUE
close_connection(conn)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.