3 ms·
Laziness/simplicity, I guess. You can't safely use semicolons as delimeters unless you parse/tokenize the entire statement (to exclude quoted semicolons). The
by teraflop 3y ago
Laziness/simplicity, I guess.
You can't safely use semicolons as delimeters unless you parse/tokenize the entire statement (to exclude quoted semicolons). The exact handling of quoted string literals can vary depending on the SQL dialect, or even the configuration, and getting it wrong could cause even more unpredictable behavior.
For instance, on MySQL I don't think it's possible to reliably identify statement boundaries without knowing the server-side value of the NO_BACKSLASH_ESCAPES setting.