Oracle RowNum Considerations

Source: Internet
Author: User

1. Use rownum you must include the first record, and if you do not include the first record, the result will not be returned. Because RowNum is a pseudo-column, it is a column that is added after the result set. And it was arranged starting from 1.

2, when using RowNum, only the East order by field is the primary key, the query results will be sorted before the calculation of rownum, conversely, if the sort field is not a primary key, there will be rownum, in the case of sorting the result set.

3, sorting paging is to note that Oracle's sorting results and optimization, if the sort field has more than one record, the same record may appear in multiple pages; The workaround is to sort by using the original sort field, in addition to the field that determines the unique field.

Oracle RowNum Considerations

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.