sql select *在确切的行数之间 [英] sql select * between exact number of rows
问题描述
我想知道是否可以使用select语句检索行的确切位置。例如235& 250.这可能吗?
I would like to know if I could using select statement retrieve exact position of the rows. e.g rows between 235 & 250. Is this possible?
在此先感谢
shashi
Thanks in advance, shashi
推荐答案
我们可以用多种方法来实现。
We can do this by multiple way.
-
我们可以借助offset-fetch子句来完成此操作。
we can do with the help of offset-fetch clause.
从Table_Name顺序中选择*按Column_Name偏移量234行仅获取接下来的16行
它将获取235-250之间的记录。因为它将跳过前234行,而将获取下16行。
it will fetch the record between 235-250. because it will skip first 234 rows and will fetch next 16 rows.
-
我们可以使用简单的select语句
we can use simple select statement with where clause.
从Table_Name中选择* where Column_Name在235到250之间
它也会获取相同的结果。
it will also fetch same result.
希望它会有所帮助。
这篇关于sql select *在确切的行数之间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!