Home > Backend Development > PHP Tutorial > 内连接的执行过程

内连接的执行过程

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 20:09:37
Original
1628 people have browsed it

内连接的执行过程
我将两个表inner join 条件是 a.hid=b.hid 他的执行过程是 a表的a与b表的bcd都匹配 然后a表的b与b表的bcd都配一次 然后获取到符号的条件的吗

回复内容:

内连接的执行过程
我将两个表inner join 条件是 a.hid=b.hid 他的执行过程是 a表的a与b表的bcd都匹配 然后a表的b与b表的bcd都配一次 然后获取到符号的条件的吗

<code>(7)     SELECT 
(8)     DISTINCT <select_list>
(1)     FROM <left_table>
(3)     <join_type> JOIN <right_table>
(2)     ON <join_condition>
(4)     WHERE <where_condition>
(5)     GROUP BY <group_by_list>
(6)     HAVING <having_condition> 
(9)     ORDER BY <order_by_condition>
(10)    LIMIT <limit_number>
</limit_number></order_by_condition></having_condition></group_by_list></where_condition></join_condition></right_table></join_type></left_table></select_list></code>
Copy after login

上面是MySQL查询关键字的运行顺序。
在内连接中它的执行顺序确实是你说的那样(典型笛卡尔积),但不仅仅是内连接,左外连接也是这个执行顺序。
还有,如果没加筛选条件的话,左外连接和内连接查出的数据是一样的。

Related labels:
php
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template