查询某表20~30行的记录

查询某表20~30行的记录

SQL CODE:

 

select top 10 * from
(select top 30 * table1 order by id) a
order by id desc

ORACLE CODE:
(

select * from 表名 where rownum<=30)
minus
(select * from 表名 where rownum<=20);

MYSQL CODE:

select * from 表名 limit 10 offset 20;

你可能感兴趣的:(sql,mysql,table)