News for hackers. Stuff that matters.
Re:The Curious Case of JavaScript’s `sort` by Domenic_S on Wednesday April 13, 2016 @11:44AM (#11489161)
MySQL exhibits similar behavior if you're comparing numbers stored in a field with string-ish type (eg, varchar):

  mysql> select cast(123 as char(255)) > "2";
  +------------------------------+
  | cast(123 as char(255)) > "2" |
  +------------------------------+
  |                            0 |
  +------------------------------+
  1 row in set (0.00 sec)
It can really bite you if you're filtering queries on "WHERE char_field > 10". I personally did not think a lot about datatypes after initial table creation... until I ran into this.

There are no comments on this comment yet.