摘要: declare @t table(成绩 int,学生 varchar(10))insert @t select100,'小张' union select 70 ,'小力' union select 80 ,'小刚' union select 78 ,'小王'select *,Pid = (select count(1) from @t where 成绩 > a.成绩)+1from @t aorder by pid/*成绩 学生 Pid ----------- ---------- ----------- 100 ... 阅读全文
posted @ 2012-06-28 12:50 ShenJH.NET 阅读(210) 评论(0) 推荐(0) 编辑