SQLite Forum

I’m just trying to construct a prefix query. It’s useful to be able to use the percent character as the escape character because then I can just replace `%` with `%%` and `_` with `%_` in the string I’m substituting, and simply add a `%` at the end.

I can use a different character, but then I also have to escape that character as well as the percent and underscore.

No big deal, just struck me as odd because the latter paragraph is addressing how to escape the characters denoted as special by the former paragraph, but doesn’t mention any constraints on the escape character. I would read that as allowing what I’m trying to do, but as ddevienne says, it’s underspecified.