#' Drop table.
#'
#' @inheritParams sqlTableCreate
#' @export
#' @examples
#' sqlTableDrop(ANSI(), "mtcars")
#' sqlTableDrop(ANSI(), "mt\nca\"rs")
setGeneric("sqlTableDrop", function(con, table, ...) {
standardGeneric("sqlTableDrop")
})
#' @export
#' @rdname sqlTableDrop
setMethod("sqlTableDrop", "DBIConnection", function(con, table, ...) {
table <- dbQuoteIdentifier(con, table)
SQL(paste0("DROP TABLE ", table))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.