Quickest, simplest? use * 1
select *
from tbl
order by number_as_char * 1
The other reasons for using * 1
are that it can
- survive some horrendous mishaps with underflow (reduced decimal precision when choosing what to cast to)
- works (and ignores) columns of purely non-numeric data
- strips numeric portions of alphanumeric data, such as 123A, 124A, 125A
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…