dbInsertInto | R Documentation |
dbWriteTable(tempTable) –> insert into select .. from –> drop tempTable
dbInsertInto(con, name, x)
con |
a *Connection object |
name |
table name |
x |
data.table |
## Not run: x = data.table(f1 = rep('a', 10), f2 = rnorm(10), f3 = 1) con = dbcon('mihai', host = '127.0.0.1', db = 'tests') dbq(con, 'CREATE TABLE temp (f1 VARCHAR(50) NULL,f2 FLOAT NULL)' ) dbInsertInto(con, 'temp', x) dbq(con, 'DROP TABLE temp') ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.