mysql>  SELECT "50" > 100, 50 > "100", "100" > 50, 100 > "50", "100" > "50", "50" > "100";
+------------+------------+------------+------------+--------------+--------------+
| "50" > 100 | 50 > "100" | "100" > 50 | 100 > "50" | "100" > "50" | "50" > "100" |
+------------+------------+------------+------------+--------------+--------------+
|          0 |          0 |          1 |          1 |            0 |            1 |
+------------+------------+------------+------------+--------------+--------------+
1 row in set (0.01 sec)

mysql>

I guess it does make sense, though I’d rather it was more like PHP (do what I mean, not what I say) or even the other extreme and throw errors (enforcing a correct database schema to start with).

PHP:

"50" > 100    --  false
50 > "100"    --  false
"100" > 50    --  true
100 > "50"    --  true
"100" > "50"  --  true
"50" > "100"  --  false