Mysql paging ORDER by one of the same fields, the discovery sequence is disordered

Source: Internet
Author: User

Two paged queries with 2 IDs skipped
SELECT * from Jdp_tb_trade where jdp_modified>= ' 2017-04-24 20:22:01 ' and jdp_modified<= ' 2017-04-24 20:23:05 ' Orde  R by jdp_modified ASC limit 215, 5; SELECT * from Jdp_tb_trade where jdp_modified>= ' 2017-04-24 20:22:01 ' and jdp_modified<= ' 2017-04-24 20:23:05 ' Orde R by jdp_modified ASC limit 220, 5; The final discovery is that because the order by:jdp_modified and paging data jdp_modified are the same, resulting in no second ordering basis, resulting in a sequence of confusion the final solution is the order by Jdp_modified,id, Sort by ID in the same situation, no repetition and no change

Mysql paging ORDER by one of the same fields, the discovery sequence is disordered

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.