问题描述
我有一个要求,我必须使用两个表 main
和 tmp
。 main 是必须始终使用的表,因此我的查询类似于
I have a requirement in which I have to use two tables main
and tmp
. main is the table that have to be used always so my query is like
code>
Select * from main;
tmp 在背景中并行创建。一旦创建,我想要使用此数据库数据库。因此,我会将 tmp 重命名为主,以便现在 tmp 成为正在使用的默认数据库,并且不需要修改现有的SQL查询。 / p>
tmp is created in background parallely. As soon its created, I want this DB db to be used. Hence, I will rename tmp to main so that now tmp becomes the default DB in use and the existing SQL queries need not be modified.
- 现在,我的问题是我可以在我重命名表格时收到类似于 table not found的错误 / li>
- Now, my question is can I get an error like table not found while I am renaming the tables?
推荐答案
SQLite ,也就是说,只要两个表修改在一个事务中完成,它就可以正常工作。
SQLite is transactional, i.e., as long as the two table modifications are done in a single transaction, it will work fine.
这篇关于可以从SQLite表读取错误,同时它正在重命名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!