powered by
Generate a CREATE TABLE statement based on a data.frame, optionally execute the statement if con is not NULL.
create_table_from_data_frame(x, table_name, con = NULL)
A string, the CREATE TABLE statement; or the results retrieved by DBI::dbSendQuery after executing the statement.
A data.frame.
A string, the name of the SQL table to create.
A database connection that can be passed to DBI::dbSendQuery/DBI::dbGetQuery.
create_table_from_data_frame(x = iris, table_name = "test")
Run the code above in your browser using DataLab