After reading this blog post, Oracle, MYSQL, SQL Server data paging query, in accordance with the company's Regionres table made
Paging query statements for SQL Server:
SELECT DISTINCT TOP -rr.id asID, Rr.strname asname, Rr.ntype asRes_type, Rr.nregid asregion_id, Rr.strchanname asChannel_name, Rr.nchannum asChannel, Rr.nsortid assort_id, Rr.ncamtype asCamera_type, Rr.nkbctrlno asKb_ctrl_num, Rr.npbtype asPlayback_type, Rr.ndevid asdevice_id, Rr.nprot asprotocol, Rr.nstreamvalue asStream_value, Rr.nstreamtype asStream_type, Rr.nbeinspect asIs_inspect, Rr.nmultid asmult_id, Rr.nmultver asMult_ver, Rr.nmultsysid asmult_sys_id, Rr.strinterareacode asIndex_code,'Pass' asDevice_index_code from( SELECTRow_number () Over(ORDER byOo.idASC) asRowNumber,* from(SELECT DISTINCT * fromRegionres oWHEREO.ntype= 0) asoo) asRRWHERERowNumber> Ten;
MySQL Paging query statement:
SELECT DISTINCTrr.id asID, Rr.strname asname, Rr.ntype asRes_type, Rr.nregid asregion_id, Rr.strchanname asChannel_name, Rr.nchannum asChannel, Rr.nsortid assort_id, Rr.ncamtype asCamera_type, Rr.nkbctrlno asKb_ctrl_num, Rr.npbtype asPlayback_type, Rr.ndevid asdevice_id, Rr.nprot asprotocol, Rr.nstreamvalue asStream_value, Rr.nstreamtype asStream_type, Rr.nbeinspect asIs_inspect, Rr.nmultid asmult_id, Rr.nmultver asMult_ver, Rr.nmultsysid asmult_sys_id, Rr.strinterareacode asIndex_code,'Pass' asDevice_index_code fromRegionres RRWHERERr.ntype= 0 ORDER byRr.idASCLIMITTen, -
Other websites:
Oracle,mysql,sqlserver examples of paging queries for three databases
Oracle, MYSQL, SQL Server data paging query