Android SQLite如何修改自增主键?

Android SQLite how to change autoincrement primary key?

我想在我的 table 中添加新的 column 并将其 column 设置为 AUTOINCREMENT PRIMARY KEY,但我已经有了table AUTOINCREMENT PRIMARY KEY.

有可能吗?

不,您不能在 SQLite 中更改列。

have a look at the things Sqlite does not implement

您应该删除 table 并创建一个新的并将数据复制回来

致谢 SQLite - AUTO INCREMENT

SQLite AUTOINCREMENT is a keyword used for auto incrementing a value of a field in the table. We can auto increment a field value by using AUTOINCREMENT keyword when creating a table with specific column name to auto incrementing it.

因此根据您的要求,您不能在 运行 时间再次使用它。 只有一种方式

  1. 卸载应用程序并重新创建 .