以前一直使用
\nselect top 10 * from article where id not in (select top 20 id from article order by id desc) order by id desc
\n这种方法来对access数据库分页,但当数据量大的时候,查询一次要花几十秒的时间,不使用order by排序就还是很快,但是查询还就得用order by来排序。
\n后来改为用大于来比较,速度就很快了
\nselect * from (select top 10 * from article where id >(select min(id) from (select top 21 id from article order by id desc)) order by id) order by id desc
\n