Posted on 2005-11-18 18:29
daiybh 閱讀(232)
評論(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