mysql 实现row_number,获取上一条,下一条

代码思路如下:

select *,(@row_num:=@row_num+1) as row_no  from stc_output,(select(@row_num:=0)) b;

select * from (select *,(@row_num:=@row_num+1) as row_no  from stc_output,(select(@row_num:=0)) b) a where a.row_no=2;

mysql 实现row_number,获取上一条,下一条

上一篇:MVC5 A claim of type 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier' or 'http://schemas.microsoft.com/accesscontrolservice/2


下一篇:MySQL启动错误ERROR! MySQL server PID file could not be found的解决办法