posts - 178,comments - 176,trackbacks - 0
01 2009 档案
各个数据库的分页算法      摘要: 1.SQL SERVER 是用先逆序再正序的方法

select top 3 * from (select top 9 * from mvc_book order by bid) as s order by s.bid desc [第6,5,4条]

select * from (select top 3 * from (select top 6 * from mvc_book order by bid) as s order by s.bid desc) as s1 order by s1.bid [第4,5,6条]

select top 6 * from mvc_book where (bid not in (select top 2 bid from mvc_book))[第3,4,5,6,7,8条]
  阅读全文
posted @ 2009-01-30 20:36 cheng 阅读(992) | 评论 (0)  编辑