what is the difference between left join and left outer join?

Shree Naath picture Shree Naath · Oct 17, 2016 · Viewed 25.2k times · Source

I have created 2 tables as

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!?

Answer

Chitharanjan Das picture Chitharanjan Das · Oct 17, 2016

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