I used +0.
Ariel
-Mensaje original-
De: Ariel Sánchez Mora
Enviado el: lunes, 20 de febrero de 2006 10:30
Para: 'leo huang'; 'Logan, David (SST - Adelaide)'
Asunto: RE: Same question, better example
Thanks a lot Leo, that worked wonders. David Logan from HP
leo huang wrote:
Ariel,
You can try this:
mysql>select stri from prueba order by stri+0 desc;
Leo Huang
Or just make the column an INT instead of a CHAR, if you want a natural
number order. Sorting is performed differently between characters and
integers - as is obviously shown in the exam
Ariel,
You can try this:
mysql>select stri from prueba order by stri+0 desc;
Leo Huang
2006/2/17, Ariel Sánchez Mora <[EMAIL PROTECTED]>:
>
> mysql> describe prueba;
> +---+-+--+-+-+---+
> | Field | Type| Null | Key | Default | Extra |
> +---+-+
mysql> describe prueba;
+---+-+--+-+-+---+
| Field | Type| Null | Key | Default | Extra |
+---+-+--+-+-+---+
| inte | int(2) | YES | | NULL| |
| stri | char(2) | YES | | NULL| |
+---+-+-