alter table drop column syntax error using sqlite

前端 未结 1 1718
长发绾君心
长发绾君心 2021-02-07 10:29

This is the schema of my table:

create table LPCG(ID integer primary key, PCG text, Desc text, test text);

I wish to drop the column \"test\",

1条回答
  •  天涯浪人
    2021-02-07 10:53

    SQLite does not fully support ALTER TABLE statements. You can only rename table, or add columns.

    If you want to drop a column, your best option is to create a new table without the column, and to drop the old table in order to rename the new one.

    0 讨论(0)
提交回复
热议问题