你好,Welcome to 留学查一查!
留学查一查
服务热线

400-178-5116

mssql 查询语句中 select top 9 * from 是查询前9条内容我想查询由第3条开始到第9条内容如何查询

提问: 冯程 分类:出国留学

优质回答

冯程

select top 9 *from 表名 whereid not in (select top 3 * from 表名)

其他回答

符佳亲

select * from table where tableID between 3 and 9用between关键字可以查询指定数的记录。

刘岸殊

我想你是想做分页查询,如果是的话,最好是用存储过程或者用自定义函数来实现。这样比较通用一些

刘欣

尝试使用以下的SQL语句:select top 6 * from (select top 9 * from [table] order by id)order by id desc

微信扫一扫下方二维码
阅读更多文章