在oracle数据库中是没有limit这个关键字的,所以需要自己写sql语句实现limit的功能.我们可以通过rownum关键字来实现.直接上例子吧
返回student结果集中前10行:
select * from student where rownum <= 10;
返回student结果集第10行到第20行:
select * from student where rownum <=20 and rownum >=10;
在oracle数据库中是没有limit这个关键字的,所以需要自己写sql语句实现limit的功能.我们可以通过rownum关键字来实现.直接上例子吧
返回student结果集中前10行:
select * from student where rownum <= 10;
返回student结果集第10行到第20行:
select * from student where rownum <=20 and rownum >=10;