SQLite Forum

Is this inherent casting by design?
See https://sqlite.org/datatype3.html

"Mathematical operators (+, -, *, /, %, <<, >>, &, and |) interpret both operands as if they were numbers."

And no, the string has to start with something that looks like a number (leading whitespace is allowed). So '10 EUR' converts to 10, whereas 'EUR 10' converts to 0.

This conversion is a convenience feature due to permissive typing; strictly typed engines may even throw a syntax error, telling you that multiplying a string and a number is unsupported.