[R] sqldf modify table

Gabor Grothendieck ggrothendieck at gmail.com
Fri Jul 16 23:43:12 CEST 2010

On Fri, Jul 16, 2010 at 2:46 PM, PeterTucker <pthetuck at gmail.com> wrote:
> Hi - I am something of a newbie and am a little perplexed.  When (trying to)
> modify a table I issue the following commands with subsequent errors
> sqldf("alter table Korea drop column code", dbname = "mydb")
> error in statement: near "drop": syntax error
> or
> sqldf("alter table Korea rename column hyr to hyrI", dbname = "mydb")
> error in statement: near "column": syntax error
> These are simple commands - am I missing something obvious?  I can retrieve
> data from them, and retrieve their table_info

SQLite does not support dropping columns. See:


however, sqldf does support the H2 and PostgreSQL databases in
addition to sqlite so you can try one of those if this feature is
important to you.

More information about the R-help mailing list