sqlAppendTable | R Documentation |
sqlAppendTable()
generates a single SQL string that inserts a
data frame into an existing table. sqlAppendTableTemplate()
generates
a template suitable for use with dbBind()
.
The default methods are ANSI SQL 99 compliant.
These methods are mostly useful for backend implementers.
sqlAppendTable(con, table, values, row.names = NA, ...)
sqlAppendTableTemplate(
con,
table,
values,
row.names = NA,
prefix = "?",
...,
pattern = ""
)
con |
A database connection. |
table |
The table name, passed on to
|
values |
A data frame. Factors will be converted to character vectors.
Character vectors will be escaped with |
row.names |
Either If A string is equivalent to For backward compatibility, |
... |
Other arguments used by individual methods. |
prefix |
Parameter prefix to use for placeholders. |
pattern |
Parameter pattern to use for placeholders:
|
The row.names
argument must be passed explicitly in order to avoid
a compatibility warning. The default will be changed in a later release.
sqlAppendTable(ANSI(), "iris", head(iris))
sqlAppendTable(ANSI(), "mtcars", head(mtcars))
sqlAppendTable(ANSI(), "mtcars", head(mtcars), row.names = FALSE)
sqlAppendTableTemplate(ANSI(), "iris", iris)
sqlAppendTableTemplate(ANSI(), "mtcars", mtcars)
sqlAppendTableTemplate(ANSI(), "mtcars", mtcars, row.names = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.