The data obtained from the left join in mysql is different from that in the master table.

Source: Internet
Author: User
For example, the landlord recently followed the video to learn the SQL statement and sent his own results. The two tables, student table and class table, were different from the teacher! The following figure shows the student information (img.ask.csdn.netupload201603251458873368_478894.png). you must query the information of the same student in the class and check that the left connection is shown as follows :! Refer to the following link for more information: (img.ask.csdn.netupload201603251458873495_704063.png! [Image description] (... mysqlsql

For example, the author has recently followed the video to learn SQL statements and sent their own results different from those of the teacher.
Two tables, student table and class table
The requirement is to query the same student information as the class, and the left link is shown as follows:
The right connection is shown as follows:
Why is the order of data displayed in the left join query not in the student table order? Isn't the student table a master table? Why is the sequence of the displayed itcast completely messy, but arranged according to the id sequence of the right table? Please, please try again

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.