Why: the order of each SQL Server query result set is different?

Source: Internet
Author: User
@ Cornelius: for the database engine, there is no way to know the difference between the first and the last. Your so-called sequence may be based on the time when the record is inserted. In this case, I usually have a dedicated field to save the creation time. Some people sorted by auto-incremental ID before, but when I grew up, I found that it was Tooyoungtoosimple. Because

@ Cornelius: for the database engine, there is no way to know the difference between the first and the last. Your so-called sequence may be based on the time when the record is inserted. In this case, I usually have a dedicated field to save the creation time. Some people sorted by auto-increment ID before, but when I grew up, I found that it was also Too young too simple. Because

@ Cornelius: for the database engine, there is no way to know the difference between the first and the last.

Your so-called sequence may be based on the time when the record is inserted. In this case, I usually have a dedicated field to save the creation time,

In the past, some people sorted by auto-incremental ID, but when I grew up, I found that it was also Too young too simple. Since the auto-increment ID reaches the maximum value, the database engine extracts unused values as IDS, so this is not an insurance.

In short, do not take it for granted that a computer is not a person, even a person. By default, there is a field, that is, the so-called sequence,

The database engine must have a hidden field (you can't see it,

Modern database engines think that data is disordered. Do you need to order it? Please design a field to save it. Thank you!

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.