Oracle, MYSQL, SQL Server data paging query

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.