Last active
April 6, 2017 12:54
-
-
Save magigo/187897cc8ef1f65f54f5 to your computer and use it in GitHub Desktop.
mysql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1、为查询结果自动编号: | |
select (@rowNO := @rowNo+1) AS rowno, user_name from (select wu.screen_name as user_name from base_wb_ids_pr_hobbies mt left join base_wb_user wu on mt.uid = wu.id where mt.hobby_id = 224424 order by -mt.pagerank limit 1000) a,(select @rowNO :=0) b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment