I cannot drop a column with ALTER TABLE
. I create a table within SQLite:
sqlite> create table example ( "field" text not null );
sqlite> .schema
CREATE TABLE example ( "field" text not null);
Then I add a column with ALTER TABLE
:
sqlite> alter table example add column onsale bool;
sqlite> .schema
CREATE TABLE example ( "field" text not null , onsale bool);
Then I try to delete it:
sqlite> alter table example drop column onsale;
Error: near "drop": syntax error
It's weird that the name onsale
is not between parenthesis. Is that the reason? Is this particular to SQLite3 or is it an SQL issue in general?