????1.Oracle:
????select * from ( select row_.*?? rownum rownum_ from ( query_SQL ) row_ where rownum == min
????2.SQL Server:
????select top @pagesize * from tablename where id not in (select top @pagesize*(@page-1) id from tablename order by id) order by id
????3.MySQL
????select * from tablename limit position?? counter
????4.DB2
????select * from (select *??rownumber() as ROW_NEXT from tablename) where ROW_NEXT between min and max
????——————————————————————————————–
????1.??????????(????Not In??SELECT TOP???)Ч????
????????????
????SELECT TOP 10 * FROM TestTable
????WHERE(ID NOT IN (SELECT TOP 20  id FROM  TestTable  ORDERBY  id))   ORDERBYID
????SELECT  TOP ???С * FROM TestTable
????WHERE( ID NOT IN (SELECT  TOP  ????С-1*????????-1  id  FROM  ?? ORDERBY  id)) ORDERBYID
?????·:?????????????????????????id?????ID??????ЩID?е????????????
????2.???????????(????ID????????SELECT TOP???)Ч???
????????????
????SELECT  TOP  10 *   FROM  TestTable
????WHERE(ID>(SELECT MAX(id) FROM(SELECT TOP20 id  FROM  TestTable ORDERBYid)AS T))ORDERBY ID
????SELECT  TOP  ???С* FROM  TestTable
????WHERE(ID>(SELECT MAX(id) FROM(SELECT TOP ????С*????????-1  id FROM ??  ORDERBY id)AS T)) ORDERBY ID
?????·:????????????????????id???????????д??ID???????ID????????????????ID???????????
????3.???????????
????SELECT TOP PageSize * FROM(SELECT TOP nPage*PageSize * from YOURTABLE order by id)as a order by id desc
????SELECT TOP ?????? * FROM (SELECT TOP ??????*??????) * from YOURTABLE order by id)as a order by id desc
?????·:????????????????????(????????)????????????????????????????