Posted on 2005-11-18 18:29
daiybh 閱讀(233)
評(píng)論(0) 編輯 收藏 引用
在數(shù)據(jù)庫(kù)中,用sql語(yǔ)句實(shí)現(xiàn)查詢數(shù)據(jù)庫(kù)中第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