我不能删除一个有ALTER TABLE
的专栏.我在SQLite中创建了一个表:
sqlite> create table example ( "field" text not null );
sqlite> .schema
CREATE TABLE example ( "field" text not null);
然后我添加一个包含ALTER TABLE
的列:
sqlite> alter table example add column onsale bool;
sqlite> .schema
CREATE TABLE example ( "field" text not null , onsale bool);
然后我试着删除它:
sqlite> alter table example drop column onsale;
Error: near "drop": syntax error
奇怪的是,onsale
这个名字没有放在括号里.这就是原因吗?这是SQLite3特有的问题还是一般的SQL问题?