怎么查看一数据库的3-5行

来源:百度知道 编辑:UC知道 时间:2024/05/06 16:05:24
只有这些 有哪位给出答案 谢谢了!!!

select top 3 * from table where id not in (select top 2 id from table)

这位兄弟说的不错.本来我也想这么说的,
看来兄弟比我快一步呀.
楼下的兄弟说不理解,真是服了你.这么简单sql都不理解.那给楼下的解释下吧.
楼主要的是3到5行数据,共三行.前两行不要
select top 2 id from table 提取前两两行数据的ID号
select top 3 * from table where id not in (...)
这句是提取前三行数据.条件是id不在上一个SQL提取两行数据ID里
所以select top 3 * from table where id not in (select top 2 id from table)提取的数据就是3到5行行的数据.共三行.楼下的兄弟明白了吗?看样子还要好好的学学SQL呀.

3-5行?
select top 3 * from table where id not in (select top 2 id from table)
就可以了吗?不理解.
还望有高人解释下。

这个方法完全可行!!

可行!

可以啊