All pastes #355772 Raw Edit

Example of col+0 res

public text v1 · immutable
·published 2007-02-14 18:48 UTC
rendered paste body
mysql> use test
Database changed
mysql> create table numtest (strnum varchar(100)) engine=myisam;
Query OK, 0 rows affected (0.00 sec)

mysql> insert into numtest values('13'),('123');
Query OK, 2 rows affected (0.00 sec)
Records: 2  Duplicates: 0  Warnings: 0

mysql> select * from numtest order by strnum;
+--------+
| strnum |
+--------+
| 123    |
| 13     |
+--------+
2 rows in set (0.00 sec)

mysql> select * from numtest order by strnum+0;
+--------+
| strnum |
+--------+
| 13     |
| 123    |
+--------+
2 rows in set (0.00 sec)

mysql>