gpt4 book ai didi

sqlite - 我在 sqlite_sequence 表中丢失了一个表名。我该如何恢复它?

转载 作者:行者123 更新时间:2023-12-03 17:38:33 27 4
gpt4 key购买 nike

似乎当我在 SQLite 管理器下的结构页面上使用“编辑列”命令修改表中的列定义(不是主键列)时,sqlite3 从其 sqlite_sequence 表中删除了该表名。我尝试手动将其添加回去,但发现在添加到丢失的表中时序列号没有得到更新。

有谁知道如何恢复丢失的表名?

最佳答案

sqlite_sequence documentation说:

If the sqlite_sequence.seq value for an AUTOINCREMENT table is manually set to something other than an integer and there is a subsequent attempt to insert the or update the AUTOINCREMENT table, then the behavior is undefined.

但是:

If the sqlite_sequence row for an AUTOINCREMENT table does not exist when the AUTOINCREMENT table is updated, then a new sqlite_sequence row is created.

所以你不应该在 sqlite_sequence 中添加一个“假的”条目,但是如果它存在你可以改变它。

关于sqlite - 我在 sqlite_sequence 表中丢失了一个表名。我该如何恢复它?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12495180/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com