数据库查询前十名和当前信息的排名信息

select * From (Select num=Row_number() Over(order By money desc),* From table1) A Where id= '430191'
UNION 
select top 10 * From (Select num=Row_number() Over(order By money desc),* From table1) A 

  

转载于:https://www.cnblogs.com/hb-strive/archive/2013/05/16/3082113.html

你可能感兴趣的:(数据库,php)