MYSQL is required to retrieve data by sorting in Chapter 5 of Reading Notes. mysql is required

Source: Internet
Author: User

MYSQL is required to retrieve data by sorting in Chapter 5 of Reading Notes. mysql is required

MySQL is an open-source Relational Database Management System (RDBMS). the MySQL database system uses the most common database management language-Structured Query Language (SQL) for database management.

In fact, the retrieved data is not displayed in a random order. If it is not sorted, the data is usually displayed in the order in which it appears in the underlying performance. This can be the order in which the data is first added to the table. However, if the data is updated or deleted later, the order will be affected by the impact of MySQL reuse to recycle the bucket. Therefore, if you do not explicitly control the order, you cannot rely on it.

Sort multiple columns in sequence:If you want to sort multiple columns in order, you must specify the DESC keyword for each column.

Position of the order by clause:When the order by clause is given, make sure it is placed behind the FROM clause. If the LIMIT keyword is used, the LIMIT must appear after order.

The above content is part of the sorting and retrieval of data in Chapter 5 of MYSQL notes. I hope it will help you, we are also very grateful for your support for the help House website!

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.