mssql 查询语句中 select top 9 * from 是查询前9条内容我想查询由第3条开始到第9条内容如何查询
select top 9 *from 表名 whereid not in (select top 3 * from 表名)
精选答案- 其他回答
尝试使用以下的SQL语句:select top 6 * from (select top 9 * from [table] order by id)order by id desc
- 其他回答
我想你是想做分页查询,如果是的话,最好是用存储过程或者用自定义函数来实现。这样比较通用一些
- 其他回答
select * from table where tableID between 3 and 9用between关键字可以查询指定数的记录。
©本文版权归作者所有,任何形式转载请联系我们。