我们可以在 android 数据库中使用截断查询吗? 否则我们可以使用我们的 java 代码执行截断操作吗?
最佳答案
如果我必须截断一个表,我只需删除并重新创建它。
文档(http://www.sqlite.org/lang_delete.html):
When the WHERE is omitted from a DELETE statement and the table being deleted has no triggers, SQLite uses an optimization to erase the entire table content without having to visit each row of the table individually. This "truncate" optimization makes the delete run much faster.
关于android - 我们可以在 android sqlite 中使用截断查询吗,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3520088/