On 8/19/19, Mitchell Keith Bloch <[email protected]> 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. Will I find this behavior to be consistent if I > later switch to another SQL implementation? What should I read to know > what's standard SQL behavior, well defined SQLite behavior, or possibly a > quirk of rusqlite? >
All prepared statements stop working - in a sense - after every schema change. However, assuming you have used sqlite3_prepare_v2() or _v3(), they will automatically rerun the SQL parser and code generator and reprepare themselves when you attempt to run them. Will the same SQL statement continue to work after you DROP and then CREATE a table it uses? That depends, I suppose, one how the new CREATE differs from the prior table that you DROP-ed. -- D. Richard Hipp [email protected] _______________________________________________ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

