SELECT @row:= @row+1 as row_no, t.*
from (
-- 需要展示的表
select * from test
) t, (select @row:=0) r;

SELECT @row:= @row+1 as row_no, t.*
from (
-- 需要展示的表
select * from test
) t, (select @row:=0) r;

2852
793
6760
2828

被折叠的 条评论
为什么被折叠?