SQL查询排序,速度结 现有表A50 89189690 如何按 位排列?50 90 891896 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select id from TB order by id asc create table test_123(a int)insert into test_123select 50unionselect 90union select 891union select 896select * from test_123order by LEN(a),a 数字就直接 order by 字段 asc如果字符的话就用2楼方式.二楼的方式很好 数字的话,安位排序就是按大小的升序排列啊。数字的话ORDER BY A字符的话ORDER BY CAST(A AS INT) select id from TB order by id asc++ select id from TB order by id asc select id from A order by id asc about Time(续3) 请教一条sql语句 SqlServer2008快照问题求教 求助!关于数据的导出与导入? 这个存储过程的执行代码应该怎样写才对? 数据库中数据问题!!!!急急 帮帮忙!我刚学SQL 2000,有没有好的教材(电子书)。 我有SQLServer2000标准版光盘.请问! 麻烦斑竹帮忙结贴 求一存储过程 大侠请帮忙 急 急 急!!! 求教SQL语句 谢谢 [求助]请介绍一两本关于数据库维护与优化的书
create table test_123(a int)
insert into test_123
select 50
union
select 90
union
select 891
union
select 896select * from test_123
order by LEN(a),a
如果字符的话就用2楼方式.
二楼的方式很好
数字的话
ORDER BY A
字符的话
ORDER BY CAST(A AS INT)
select id from TB order by id asc++
select id from A order by id asc