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.
我正在使用 sqlite 连接在 android 中开发一个游戏应用程序.. 一切都很好.. 但现在我想这样做,所以我的数据库中只剩下过去 20 条数据.. 这意味着在我想要的每个插入数据语句中删除最后剩余的最后一个数据 发送 20 个数据
这可以使用 sql 查询来完成。首先检索表中可用的记录总数。然后使用 if-else 条件。
如果记录数>20
then { 根据条件删除一条记录;
在表中插入新记录。
}
否则在表中插入新记录。