查出第十 到 第二十条记录

Posted on 2006-07-11 13:24  fgp3  阅读(191)  评论(0)    收藏  举报

select top 10  * from table where id not in( select top 10 id from table order by id desc) order by id desc



select top 10 * from(select Top 20 * from table_A order by id desc)


更新数据时维护一个连续编号字段

select  * from table where 连续编号字段>9 and 连续编号字段<21





博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3