JBOSS 点滴

丰丰的博客

sql server 实现分页


方法一
select top 10 * from tablename where id not in (select top 10*4 id from tablename)
//10 每页显示记录数
//4 第几页
//id 主健
//自己写个函数吧,别忘了加上where 和order by条件。

方法二:(针对视图也好用,相对第一种方法效率低一些)
select * from
(select top 20 * from v_LkFaceValue ) ss
where trnbr not in (select top 10 trnbr from v_LkFaceValue)

posted on 2007-04-11 15:25 半导体 阅读(139) 评论(0)  编辑  收藏


只有注册用户登录后才能发表评论。


网站导航: