首页 >数据库 >mysql教程 >MYSQL 排行类的相关SQL写法,仅供参考_MySQL

MYSQL 排行类的相关SQL写法,仅供参考_MySQL

WBOY
WBOY原创
2016-06-01 13:19:00872浏览

bitsCN.com

SELECT * FROM    (SELECT pid, (@rowno:=@rowno+1) as rowno FROM user, (select (@rowno:=0)) b WHERE cid = 1  order by total_score DESC) as c WHERE pid = 1
bitsCN.com
声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn