各個數據庫的分頁算法
摘要: 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 閱讀(1297) |
評論 (0) 編輯