2023. 6. 9. 17:20ㆍDB/MySQL
1. FROM/JOIN: The FROM and/or JOIN clauses are executed first to determine the data of interest.
2. WHERE: The WHERE clause is executed to filter out records that do not meet the constraints.
3. GROUP BY: The GROUP BY clause is executed to group the data based on the values in one or more columns.
4. HAVING: The HAVING clause is executed to remove the created grouped records that don’t meet the constraints.
5. SELECT: The SELECT clause is executed to derive all desired columns and expressions.
6. ORDER BY: The ORDER BY clause is executed to sort the derived values in ascending or descending order.
7. LIMIT/OFFSET: Finally, the LIMIT and/or OFFSET clauses are executed to keep or skip a specified number of rows.
출처: <https://towardsdatascience.com/a-look-into-sqls-order-of-execution-d0b81e361c66>
'DB > MySQL' 카테고리의 다른 글
mysqldump access denied 안될때 (0) | 2023.06.30 |
---|---|
mysql8 User 권한 수정 (0) | 2023.06.09 |
MySQL 이모지 캐릭터셋 에러 (0) | 2023.06.09 |
mysql join 예약어 안쓰고 join하기, mysql from 여러개로 조인하기 (0) | 2023.06.09 |
MySQL root 패스워드 분실 초기화 (0) | 2023.06.09 |