有以下两种方法可查询:
第一种方法:
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;
希望本文所述对大家MySQL数据库计有所
- 相关评论
- 我要评论
-
301
301
301
301
301
300
300
300
299
299