求一名SQl语句??感谢 表aa b3 02 17 08 1怎么显示a b 8 12 17 03 0意思是先按b从大到小排..再按 a从大到小排....在一条语句中,....谢谢!!! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select * from 表 order by b desc,a desc select * from 表 order by b desc,a desc declare @t table(a int,b int)insert @tselect 3, 0 union allselect 2, 1 union allselect 7, 0 union allselect 8, 1select * from @t order by b desc,a desc/*结果a b-------------8 12 17 03 0*/ select * from 表 order by b desc,a desc 一个数据库查询的问题,请大家帮帮忙! 如何将一张表中有着相同ID的某个字段的所有值在查询结果中放入一个字段 EXCEL导入SQL的础问题,求解 关于sql内存的问题 连开四贴都没有解决的问题,两表连查取不重复的记录,谢谢解答 关于这段游标写法,为什么报只读?The cursor is READ ONLY. 在同一数据库中如何查找具有相同字段的表名? 简单问题,需高手回答 WIN2000SERVER下SQL SERVER2000安装不下去 求解,交叉表问题 简单的查询 求助一个查询和删重复记录的方法
insert @t
select 3, 0 union all
select 2, 1 union all
select 7, 0 union all
select 8, 1select * from @t order by b desc,a desc/*结果
a b
-------------
8 1
2 1
7 0
3 0
*/