第一种方法:

select   (@i:=@i+1)   as   i,table_name.*   from   table_name,(select   @i:=0)   as   it 

第二种方法:

 

 

set @rownum=0;
select @rownum:=@rownum+1 as rownum, t.username from auth_user t limit 1,5;

相关文章:

  • 2021-07-10
  • 2021-09-05
  • 2022-12-23
  • 2022-02-02
  • 2022-12-23
猜你喜欢
  • 2021-11-05
  • 2022-12-23
  • 2022-12-23
  • 2021-06-18
  • 2021-07-10
  • 2022-12-23
相关资源
相似解决方案