Description Usage Arguments Details See Also Examples
'sqlReplaceInTable()' generates a single SQL string that inserts a data frame into an existing table. 'sqlReplaceTableTemplate()' generates a template suitable for use with [dbBind()]. The default methods are MariaDB, MySQL compliant. These methods are mostly useful for backend implementers.
1 2 3 4 |
con |
A database connection. |
table |
Name of the table. Escaped with
|
values |
A data frame. Factors will be converted to character vectors. Character vectors will be escaped with [dbQuoteString()]. |
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: - '""': no pattern - '"1"': position - anything else: field name |
The 'row.names' argument must be passed explicitly in order to avoid a compatibility warning. The default will be changed in a later release.
Other SQL generation: sqlAddIndex
,
sqlAlterTableWithPrimaryKey
,
sqlDeleteAllRecords
,
sqlOnClause
, sqlSetClause
,
sqlUpdateTable
1 2 3 4 5 6 7 8 | sqlReplaceInTable(ANSI(), "iris", head(iris))
sqlReplaceInTable(ANSI(), "mtcars", head(mtcars))
sqlReplaceTable(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.