我想在sqlite数据库中删除或添加列
我使用以下查询删除列。
ALTER TABLE TABLENAME DROP COLUMN DIST_TYPE
但它给出错误
System.Data.SQLite.SQLiteException: SQLite error near "DROP": syntax error
ALTER TABLE SQLite
SQLite 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旧表,>重命名新的。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。