一个用户表 user,
  id
  user
一个积分表score,
  user
  score
通过用户名查询积分名次。

解决方案 »

  1.   

    积分名次sortNum在表中用一列来显示
      

  2.   

    SQL语句是sql="select top 1 scroe from scroe where user='" & trim(request("user")) & "'"这样就是查询这个你提交的这个用户名的他的积分啊
      

  3.   

    积分没有按积分名次排序,我想得到用户的名次,
    名次放在另一列中,如
    user   score  SortNumadmin  10000   2
      

  4.   

    SELECT IDENTITY(int, 1,1) AS 名词,id,user,score into #temp_table
    from scoreselect user,score from temp_table where user=/...
      

  5.   

    select count(score) from score where score >=(select scroe from scroe where user='"+useer+"') order by score
      

  6.   

    select IDENTITY(int, 1,1) as sortNum,user,score into #tmpscore from [score]
    select * from #tmpscore
    drop table #tmpscore
      

  7.   

    select IDENTITY(int, 1,1) as sortNum,user,score into #tmpscore from [score] order by score desc
    select * from #tmpscore
    drop table #tmpscore
      

  8.   

    select count(score) from score where score>=(select score from score) and user='user'
      

  9.   

    select IDENTITY(int, 1,1) as sortNum,user,score from score order by score desc