本文介绍了如何在MS Access中选择第n行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个MS Access数据库,正在处理其中一个表.当我按日期使用选择查询顺序时,它给出了大约1000行.我只想显示第三行.如何使用仅向我提供第三行输出的选择查询?
I have a MS Access database and I am working on one of its table. When I use the select query order by date, it gives 1000 approx rows. I want to display the 3rd row only. How can I use the select query that provides me with an output of 3rd row only?
推荐答案嵌套查询可以做到,就像这样:
nested query would do it, something like this:
declare @table table (id int) insert into @table values (1),(2),(3),(4),(5) select top 1 id from ( select top 3 id from @table order by id desc ) t order by t.id asc刚刚注意到您说它是MS-Access,但选择查询仍然是相同的
Just noticed you said it was MS-Access, The select query would still be the same
更多推荐
如何在MS Access中选择第n行?
发布评论