Hi Srinivas,
I'm really sorry, but you cannot DROP a COLUMN:
SQLite doesn't allows this operation.
As you surely know SQLite has lots of specific
idiosyncrasies: and this is one.
Dropping column isn't supported: and this is
the end of the history.
Anyway, you can quite easily circumvent this
limitation doing something like:
BEGIN TRANSACTION;
ALTER TABLE some-table RENAME TO old-table;
CREATE TABLE some-table (...);
INSERT INTO some-table (...) SELECT ... FROM old-table;
DROP TABLE old-table;
COMMIT TRANSACTION;
VACUUM;
----
1) the complete operation is performed within
a TRANSACTION: so, if some error occurs, DB
integrity will be safely preserved
2) first you have to rename your target table
3) now you can create a new table (using the
original name): obviously you'll omit to
declare the column(s) you intend to DROP
4) INSERT INTO SELECT FROM will copy any row
from the old table into the new one
5) and when the new table has been populated
then you can DROP the old table.
6) VACUUMing the DB may help in order to reclaim
any unused page.
Voila: all done.
bye Sandro