On 4/27/19, Manuel Rigger <rigger.man...@gmail.com> wrote: > Thanks for your quick and helpful reply! So if I understood correctly, > there is no way to ensure that a string is not interpreted as a column in > an arbitrary expression, right?
String literal is always just a string literal in an arbitrary expression. String literals can only be interpreted as an identifier in a context where only an identifier is allowed, such as after "CREATE TABLE", for example. The one exception to the above is that if the argument to CREATE INDEX is an expression that is comprised of a single string literal, then that string literal is interpreted as a column name rather than as an expression. This is done for historical compatibility, and because there is no point in having an index on a constant expression. See the implementation at https://www.sqlite.org/src/artifact/61655dad911a?ln=1319-1341 -- D. Richard Hipp d...@sqlite.org _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users