一句话实现Mysql查询结果带行号

SELECT @rowno:=@rowno + 1 AS rowno,a.* FROM tableName a,(SELECT @rowno:=0) b
posted @ 2016-07-09 11:17  yudis  阅读(10019)  评论(0编辑  收藏  举报