I believe "analyze sqlite_master;" will force a re-parse without requiring a new connection. Try it and let us know.
-----Original Message----- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of sanhua.zh Sent: Friday, October 21, 2016 2:49 AM To: SQLite mailing list Subject: Re: [sqlite] Drop Existing Table Results in 'no such table' You are changing the details saved on disk but not the copy in memory. Since reopen a new connection is a ugly way, is there any other way to update the memory ? I know that sqlite3InitCallback may update it, but I can’t find a way to invoke it. 原始邮件 发件人:Simon slavinslav...@bigfraud.org 收件人:SQLite mailing listsqlite-us...@mailinglists.sqlite.org 发送时间:2016年10月21日(周五) 14:39 主题:Re: [sqlite] Drop Existing Table Results in 'no such table' On 21 Oct 2016, at 4:42am, sanhua.zh sanhua...@foxmail.com wrote: I am trying to rename a table by editing the sqlite_master directly. I do know there are a ‘ALTER TABLE … RENAME TO …’ syntax to do that. I just want to try it in this way. But I find that the ‘no such table’ error occurs while I try to drop the renamed table. SQLite does not look at the sqlite_master table before executing each command. It has a copy of the database schema in the memory allocated to the connection. You are changing the details saved on disk but not the copy in memory. Only I close the connection or start a new connection, the renamed table can be dropped. That makes sense. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users