tags:

views:

33

answers:

0

I need to write a DROP COLUMN routine for manipulating SQLite databases.

It would be called something like this:

dropColumn("SomeTable", "SomeColumn");

The SQLite FAQ says that to drop a column, you have to create a temporary table containing just the columns you want, and then copy the data across to it, and then rename it.

It shouldn't be too hard to encapsulate that into a routine. But it looks like it would be kind of annoying to write it.

Surely someone out there has written such a routine already. If so, can I steal it please? :)