搜索

SQL2000 以ID降序的方式查询出第600--1000条的语句怎么写啊!

发布网友 发布时间:2022-04-24 14:34

我来回答

4个回答

热心网友 时间:2023-10-16 15:33

select top 399 * from tablename where id not in
(select top 599 id from tablename order by id desc)
order by id desc
算错了,应该是401条数据
select top 401 * from tablename where id not in
(select top 599 id from tablename order by id desc)
order by id desc

热心网友 时间:2023-10-16 15:33

select top 401 * from table
where not exists (select top 599 from table)
order Id desc

热心网友 时间:2023-10-16 15:34

select top 600 * from 表 order by id desc

热心网友 时间:2023-10-16 15:34

select top 400 * from tablename where id not in
(select top 599 id from tablename order by id desc)
order by id desc
你可以直接写一个分与的存储过程
声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。
E-MAIL:11247931@qq.com
Top