oracle
select * from (select * from (select s.*, rownum rn from student s)
where rn<=5) where rn>0
mysql
select * from table_name where 1 =1 limit (start, end)
文章讨论了Oracle和MySQL数据库中的SQL查询技巧,重点比较了使用子查询获取前5行数据以及如何在MySQL中实现分页(limitstart,end)的功能。
select * from (select * from (select s.*, rownum rn from student s)
where rn<=5) where rn>0
select * from table_name where 1 =1 limit (start, end)
2685

被折叠的 条评论
为什么被折叠?