On 19 Aug 2019, at 11:22pm, Mitchell Keith Bloch <baz...@gmail.com> wrote:

> I have observed that preparing statements that depend on a table will fail if 
> the table does not currently exist. It appears that those prepared statements 
> will, however, continue to function if the table is dropped and subsequently 
> recreated.

To expand a little on the previous answer, preparing a statement uses internal 
details of the tables it refers to.  The 'prepared' version doesn't just refer 
to entity names, it exploits information about how the table is organised.  So 
deleting a table invalidates all preparations which refer to it.

So deleting the table causes the prepared statement to become invalid (you 
might call this 'fail') too.  However, as DRH wrote, if you used 
sqlite3_prepare_v2() or _v3(), the next time the statement is used SQLite 
realises that the statement is no longer prepared and prepares it again.
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to