[ciapug] MySQL table data - "1" and "01" different values

Lathrop Preston ciapug@cialug.org
Tue, 06 Apr 2004 11:27:37 -0500


ok based on what Champ dug up.

this should work (store car_num as VARCHAR(3))

SELECT car_num, CAST(car_num AS INT) AS cn_int, [any other fields] FROM 
the_table [WHERE whatever] ORDER BY cn_int

Lathrop