MySQL Learning Note (it performs the steps)

Source: Internet
Author: User


The basic steps are: (Not very accurate, please read this article)
1.from
2.join on
3.where
4.group by
5.having
6.order by
7.select
8.distinct, Sum,...
9.limit

Join table must have an index or the Cartesian product.
INNER JOIN's Special
Correctly speaking, MySQL will first select the best table join table method with the filter condition of the base on where. Then it is the for 1st table that will filter where to start the join first.
However, we usually use the straight join to control it, lest we don't know that the table will be in the final join.
Having is filtering out the rows after group by, this time the filter can use the count sum of those, which is not used in the where.

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.