在数据库中 分段查找

Posted on 2005-11-18 18:29 daiybh 阅读(246) 评论(0)  编辑 收藏 引用
在数据库中,用sql语句实现查询数据库中第m到n条记录
  
         1: select top n-m * from (select top n * from tablename ) t order by id desc
     


   2: select top n-m * from tablename where id <> (select top n id
            from  tablename   order by id) order by id





只有注册用户登录后才能发表评论。
网站导航:   博客园   博客园最新博文   博问   管理