我们自己锁预想的SQL语句的执行顺序与实际的SQL语句的执行顺序是有区别的,因为mysql有这自带的优化器。
人写SQL语句
select <select_list> from <left_table> <join_type> join <right_table> on <on_condition> where <where_condition> group by <group_by_condition> having <having_condition> order by <order_by_condition> limit <limit_number>
机读的SQL顺序
from <left_table> on <join_condition> <join_type> join <right_table> where <where_condition> group by <group_by_condition> having <having_condition> order by <order_by_condition> limit <limit_number>
记录一下学习笔记,若有错误还请大家指出