今天在练习过程中发现mysql中没有Oracle中用rownum分页的操作
在Oracle中的语句为
select t2.* from
(select t1.*,rownum rn from
(select * from student order by sid) t1 where rownum <=9) t2 where t2.rn>6
在mySql中语句为
SELECT * FROM teacher ORDER BY tid LIMIT 5,5
今天在练习过程中发现mysql中没有Oracle中用rownum分页的操作
在Oracle中的语句为
select t2.* from
(select t1.*,rownum rn from
(select * from student order by sid) t1 where rownum <=9) t2 where t2.rn>6
在mySql中语句为
SELECT * FROM teacher ORDER BY tid LIMIT 5,5