SQLite Forum

multiple queries
Login
> ... the semicolon you found might be in the middle of a string literal or a trigger.

or indeed inside an object name or inside a comment.

I had to make an SQLite-like SQL parser for the SQLiteSpeed project long ago and the semi-colon test-case was very similar to Larry's example, only also inside a trigger definition with commented out semi-colons both EOL comments (-- ..;. EOL) and in-line comments (/* ..;. */) and so on.

It seems such a simple rule, but parsing it can get hairy if tried straight from the text.