Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个自动递增的 ID 字段。我想做的是在完成 INSERT 命令后检索分配给此 ID 字段的值。
有人可以告诉我该怎么做吗?
谢谢
你想要last_insert_rowid():
last_insert_rowid()
SELECT last_insert_rowid();