代码思路如下:
select *,(@row_num:[email protected]_num+1) as row_no from stc_output,(select(@row_num:=0)) b;
select * from (select *,(@row_num:[email protected]_num+1) as row_no from stc_output,(select(@row_num:=0)) b) a where a.row_no=2;
时间: 2024-10-05 05:50:54