So, in Europe the street name comes first, then the number of the building.
In the US the number of the building comes first, then the actual street, which makes it a little bit rougher to sort.
Imagine a table like this:
mysql> SELECT * FROM numsort;
+——+
| a |
+——+
| 5 |
| a |
| 2 |
| d |
| 22 |
| c |
| 33 |
| 3 |
+——+
8 rows in set (0.00 sec)
The desired order in this case would be 2, 3, 5, 22, 33, a, b, c, d.
[Read more...]mysql> SELECT * FROM numsort ORDER BY a;
+——+
| a |
+——+
| 2 |
| 22 |
| 3 |