SQLite Forum

Is this inherent casting by design?
Login
The behavior is documented.

"Mathematical operators (+, -, *, /, %, <<, >>, &, and |) interpret both operands as if they were numbers. STRING or BLOB operands automatically convert into REAL or INTEGER values."

The rules for converting strings to numbers roughly take the longest prefix from the string that looks like a number.