Writing the data frame to MySql DB table

后端 未结 3 1844
梦如初夏
梦如初夏 2020-12-28 18:52

How to write the data frame in R into MySQL?

dateTime            host    authId     sessionId      status                    action         


        
3条回答
  •  佛祖请我去吃肉
    2020-12-28 19:26

    It worked for me using the command below. Note that this will append the rows in yourtable to the database named yourTableInMySQL.

    library(RMySQL)
    dbWriteTable(con, "yourTableinMySQL", yourtable, append = TRUE)
    

提交回复
热议问题