SQLite Forum

multiple queries
Login
> With very similar memory allocation, you could just extract the single SQL statements from the statement glom and do the prepare/step/finalize on each one. That would be more straightforward, IMO.

Though of course you would have to parse the statement to find the endings if the statement contained any quotes (quote, double-quote, square-brackets or backticks) and make sure they were nested/unnested properly in order to find the end of a statement.

Alternatively I suppose you could split on a semicolon and re-assemble complete statements using the `sqlite3_complete` API to fixup improper divisions...