zoukankan      html  css  js  c++  java
  • mysql学习03-sql执行加载顺序

    1.sql语句

    select distinct <select_list>

    from

    left_table <join_type> join right_table

    on <join_condition>

    where <where_condition>

    group by <group_by_list>

    having <having_condition>

    order by <order_by_conddition>

    limit <limit_num>

    2.mysql服务器处理后的顺序

    from left_table

    on join_condition

    join_type join right_table

    where where_condition

    group by group_by_list

    having having_condition

    select

    distinct select_list

    order by order_by_condition

    limit limit_num

    顺序:先确定要查询的表,

    然后where条件过滤数据,

    group by进行分组,

    having条件过滤每个组中的数据,

    确定要查询的字段,

    对于查出来信息进行排序

    限制查询数据的量。

  • 相关阅读:
    kafka副本
    kafka消息丢失
    kafka消费者
    RN8302b调试笔记
    MDK #pragma anon_unions
    [Python笔记]Strip
    [Python笔记]AnyAll
    [Python笔记]元组
    [Python笔记]列表
    嵌入式平台移植Python
  • 原文地址:https://www.cnblogs.com/joeking/p/12541983.html
Copyright © 2011-2022 走看看