Description Usage Arguments Examples
View source: R/sql_createtable.R
Creates a new table within a database
1 | sql_createtable(tbl_name, col_names, col_types, primary_key = -1)
|
tbl_name |
- the name of the table to be made |
col_names |
- a vector of the desired column names |
col_types |
- a vector of the desired column types (length of col_names and col_types must be equal) |
primary_key |
- a vector with the columns to be included in the primary key (default is all of them) |
1 2 3 | sql_createtable("Table1", c("c1","c2"), rep("INTEGER",2), primary_key = "c1")
sql_createtable("Table2", c("c1","c2", "c3"), rep("INTEGER",3), primary_key = c("c1","c2"))
sql_createtable("Table3", c("c1","c2"), rep("INTEGER",2))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.