27,579
社区成员
发帖
与我相关
我的任务
分享
CREATE TABLE tb(Item varchar(10),Model varchar(10))
INSERT tb
SELECT 'Table','10.5CM'
UNION ALL SELECT 'Table','10CM'
UNION ALL SELECT 'Table','12CM'
select * from tb order by cast(replace(Model,'CM','') as decimal)
/*
Item Model
---------- ----------
Table 10CM
Table 10.5CM
Table 12CM
(3 row(s) affected)
*/