SQLite add Primary Key

前端 未结 11 2444
你的背包
你的背包 2020-11-28 06:07

I created a table in Sqlite by using the CREATE TABLE AS syntax to create a table based on a SELECT statement. Now this table has no primary key b

11条回答
  •  粉色の甜心
    2020-11-28 06:27

    You can't modify SQLite tables in any significant way after they have been created. The accepted suggested solution is to create a new table with the correct requirements and copy your data into it, then drop the old table.

    here is the official documentation about this: http://sqlite.org/faq.html#q11

提交回复
热议问题