【Mysql学习笔记】关键字顺序以及执行顺序

【Mysql学习笔记】关键字顺序以及执行顺序_第1张图片

关键字顺序(如上):

SELECT ... FROM ... WHERE ... GROUP BY ... HAVING ... ORDER BY ...

【Mysql学习笔记】关键字顺序以及执行顺序_第2张图片
关键字执行顺序(如上):

FROM > WHERE > GROUP BY > HAVING > SELECT的字段 > DISTINCT > ORDER BY > LIMIT

你可能感兴趣的:(数据库,mysql,学习,笔记)