SQL Server paging: MySQL page: Orcale paging

Source: Internet
Author: User

一,sqlserver分页: SELECT TOP (每页显示的数据条数) * FROM 表名  WHERE (ID  NOT IN ( SELECT TOP ((当前页码 -1)*每页显示的数据条数 -1) ID  FROM 表名  AS 表名1_1   ORDER BY ID))  ORDER BY ID; 二:mysql分页      select from 表名  where id limit((当前页码 -1)*每页显示的数据条数,当前页码 * 每页显示的数据条数); 三:orcale分页 SELECT FROM (   SELECT A.*, ROWNUM RN   FROM ( SELECT FROM 表名) A   WHERE ROWNUM <= 当前页码 * 每页显示的数据条数 )   WHERE RN >= ((当前页码 -1)*每页显示的数据条数 +1);

SQL Server paging: MySQL page: Orcale paging

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.