I am trying to connect MySQL with R by referring the belowlink.


I used the below commands to create the table in MySQ using R.

Command: con<-odbcConnect("MySQL", uid="root", pwd="root",)

Command: sqlTables(con)

Command: data12<-sqlSave(con,as.data.frame(mydata1))


But this works if I want to insert the data into a new table. I would like to know how can we insert the data into an existing MySQL table.

Also please help me how can I update the existing the tables.


We can do it with the help  of sqldf() function

Please refer to the below link in which instructor has addressed this query at 40 minutes with an example.


You may also refer to the below link that would guide about the Data imports using R