选择记录跳过MS Access中的行 [英] Select records skipping rows in MS Access

查看:64
本文介绍了选择记录跳过MS Access中的行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在数据库中选择一些记录,从而跳过MS Access中的行数. 在MySQL中是LIMIT x, y. Firebird是FIRST x SKIP y等.

How do I can select some records on database skipping a number o rows in MS Access. In MySQL is LIMIT x, y. Firebird is FIRST x SKIP y etc..

在Google上根本没有运气=(

No lucky on Google at all =(

推荐答案

如果您知道要跳过多少条记录,则可以执行以下操作:

If you know how many records you want to skip, then you could do something like this:

SELECT *
FROM myTable x
WHERE x.ID NOT IN (SELECT Top 10 id FROM myTable ORDER BY ....)
ORDER BY ...

然后,您可以排除不需要的记录.

Then you could exclude the records that you don't want.

如果您随后知道要返回的记录总数,则可以执行以下操作:

If you then know the total number of records that you want to return, then you could do the following:

SELECT Top 50 *
FROM myTable x
WHERE x.ID NOT IN (SELECT Top 10 id FROM myTable ORDER BY ....)
ORDER BY ...

这篇关于选择记录跳过MS Access中的行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆