要查数据表中第30到40条记录,有字段ID,但是ID并不连续,如何写SQL语句?

日期:2019-08-24 17:59:33 人气:2

要查数据表中第30到40条记录,有字段ID,但是ID并不连续,如何写SQL语句?

例:select * from employees e where rownum betwon 30 and 40; 解释:rownum -- 数据库会为出现在查询结果里的记录进行编号,从1开始。 -- 请打印表里的前5行记录 select * from employees where rownum<=5; -- 请打印表里的第6到第10行记录 select * from employees where rownum between
    A+
热门评论