SQL 语句的执行过程是什么?
发布于 2022-09-21 08:59:25
关注者
0
被浏览
20
1 个回答
-
一般SQL语句书写顺序是 select distinct\* from table left join table2 on conditions where conditions group by conditions having consitions with cube order by conditions limit num; 这里面有十个关键词,执行顺序是先找表,在找关键词连接表,再用条件过滤,再排序,再后limit,最后才是select取出数据。 执行顺序如下: from table left join table2 on conditions where conditions group by conditions having conditions with cube distinct result order by conditions limit nun;