Home >Database >Mysql Tutorial >What is the priority of mysql query statements?

What is the priority of mysql query statements?

青灯夜游
青灯夜游Original
2020-09-30 17:03:584147browse

What is the priority of mysql query statements?

The execution order of sql and mysql, the internal mechanism is the same, the biggest difference is in the alias

mysql execution order

1, from

2, on

3, join

4, where

5, group by (start using the alias in select, and you can use it in subsequent statements )

6, avg, sum.....

7, having

8, select

9, distinct

10. Order by

Recommended tutorial: mysql video tutorial

The above is the detailed content of What is the priority of mysql query statements?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn