日期:2014-05-20  浏览次数:20608 次

在server 2000中排序
我又两个表格 tbDepartmentUnits :
字段名称   字段说明
id   主键           
code   单位编号
name   单位名称
belongtocategory

tbDepartmentMonthWorkAssessment

字段名称            字段说明
id                主键
Su_code 被考核单位编号
month       时间
informationscore 信息化考核得分
enforcementscore 执法规范化考核得分
score           分数



我想实现按分数排名出现如下效果

Du_name    Du_belongtocategory  Dmwa_informationscore   Dmwa_enforcementscore Mwa_score  Mwa_rank
 单位1      综合管理               25                          20                 45       3
 单位2      综合管理               30                          20                 50       1
 单位3      执法                   24                          23                 47       2

主要就是后面的rank ,想自动出现这个列
------解决方案--------------------
http://w3schools.com/sql/sql_quickref.asp