一:Oracle
select * from (select rownum,name from table where rownum <=endIndex )
where rownum > startIndex
二:DB2
DB2分頁查詢
SELECT * FROM (Select 字段1,字段2,字段3,rownumber() over(ORDER BY 排序用的列名 ASC) AS rn from 表名) AS a1 WHERE a1.rn BETWEEN 10 AND 20
以上表示提取第10到20的紀(jì)錄
select * from (select rownumber() over(order by id asc ) as rowid from table where rowid <=endIndex )
where rowid > startIndex
三:MySQL
:select ? * ? from ? table ? limit ? start,pageNum??
posted on 2006-12-11 12:06
西紅柿(tomato) 閱讀(4709)
評(píng)論(4) 編輯 收藏 所屬分類:
數(shù)據(jù)庫相關(guān)