DB
DB
SELECT * FROM (Select 字段
以上表示提取第
select * from (select rownumber() over(order by id asc ) as rowid from table where rowid <=endIndex ) where rowid > startIndex
如果Order By 的字段有重復的值
select * from ( select ROW_NUMBER() OVER(ORDER BY DOC_UUID DESC) AS ROWNUM
增加行號
select * from ( select ROW_NUMBER() OVER() AS ROWNUM
增加行號
select * from ( select ROW_NUMBER() OVER( ORDER BY DOC_UUID DESC ) AS ROWNUM
Mysql:
最簡單
select * from table limit start
比如從
select * from table limit
Oracle
select * from (select rownum
例如從表Sys_option(主鍵為sys_id)中從
SELECT *
FROM (SELECT ROWNUM R
Where t
sql server:
例如從表Sys_option(主鍵為sys_id)中從
SELECT *
FROM (SELECT ROWNUM R
Where t
From:http://tw.wingwit.com/Article/program/Oracle/201311/18958.html