在 SQLite 中设置 AUTOINCREMENT 的起始值 [英] Set start value for AUTOINCREMENT in SQLite
本文介绍了在 SQLite 中设置 AUTOINCREMENT 的起始值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何为 SQLite 中的 AUTOINCREMENT 字段设置起始值?
How can I set the start value for an AUTOINCREMENT field in SQLite?
推荐答案
将 value-1
显式插入表中,然后删除该行.
Explicitly insert the value-1
into the table, then delete the row.
下一个评论,讨论直接编辑 SQLITE_SEQUENCE
表可能更可取:https://stackoverflow.com/a/692871/10093
the next comment down, which discusses editing the SQLITE_SEQUENCE
table directly is probably preferable: https://stackoverflow.com/a/692871/10093
这篇关于在 SQLite 中设置 AUTOINCREMENT 的起始值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文