我想在sqlite数据库中删除或添加列
ALTER TABLE TABLENAME DROP COLUMN DIST_TYPE
但它给出错误
System.Data.sqlite.sqliteException: sqlite error near "DROP": Syntax error
ALTER TABLE SQLite
原文链接:https://www.f2er.com/sqlite/198441.htmlsqlite supports a limited subset of ALTER TABLE. The ALTER TABLE command in sqlite allows the user to rename a table or to add a new column to an existing table. It is not possible to rename a column,remove a column,or add or remove constraints from a table.
您可以:
>创建新表作为您尝试更改的表,>复制所有数据,> drop旧表,>重命名新的。