This question already has an answer here:
这个问题在这里已有答案:
- LEFT JOIN vs. LEFT OUTER JOIN in SQL Server 17 answers
SQL Server 17答案中的LEFT JOIN与LEFT OUTER JOIN
I have created 2 tables as
我创建了2个表
CREATE TABLE table1(customerName VARCHAR(20),custid NUMBER ,order_id NUMBER ,price NUMBER );
CREATE TABLE table2(id NUMBER ,salary NUMBER );
Now, I tried to use the queries
现在,我尝试使用查询
SELECT t1.customername,t1.custid,t2.salary FROM table1 t1 left join table2 t2 ON t1.custid = t2.id;
SELECT t1.customername,t1.custid,t2.salary FROM table1 t1 left outer join table2 t2 ON t1.custid = t2.id;
But I get the same output. Is there any difference between them internally in their working ? or are both same!?
但我得到了相同的输出。他们的工作内部有什么区别吗?或者都是一样的!?
1 个解决方案
#1
20
The OUTER
keyword is optional across most popular SQL distributions, which means there is absolutely no difference between a LEFT JOIN
and a LEFT OUTER JOIN
OUTER关键字在大多数流行的SQL发行版中是可选的,这意味着LEFT JOIN和LEFT OUTER JOIN之间绝对没有区别。
#1
20
The OUTER
keyword is optional across most popular SQL distributions, which means there is absolutely no difference between a LEFT JOIN
and a LEFT OUTER JOIN
OUTER关键字在大多数流行的SQL发行版中是可选的,这意味着LEFT JOIN和LEFT OUTER JOIN之间绝对没有区别。