Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 left join vs left outer join

Author  Topic 

soorajtnpki
Posting Yak Master

231 Posts

Posted - 2008-04-07 : 00:23:59
Is there any difference between left join and left outer join in sql server 2000?please reply with example if any?
Thanks in advance

snSQL
Master Smack Fu Yak Hacker

1837 Posts

Posted - 2008-04-07 : 00:47:44
No difference, the keyword OUTER is optional.
Go to Top of Page

soorajtnpki
Posting Yak Master

231 Posts

Posted - 2008-04-07 : 01:36:24
then why there is left inner and left outer joins in sql server ????
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-04-07 : 01:42:08
There is no LEFT INNER JOIN. INNER JOIN do not have any sides because they only return rows from both tables that match the ON clause.
Go to Top of Page

soorajtnpki
Posting Yak Master

231 Posts

Posted - 2008-04-07 : 02:02:40
But visakh there is left join,then wats the use of left join over left outer join,r they the same??
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-04-07 : 02:31:49
Yup. They are the same. OUTER is an optional word. LEFT JOIN or LEFT OUTER JOIN is one and the same thing.
Go to Top of Page

soorajtnpki
Posting Yak Master

231 Posts

Posted - 2008-04-07 : 02:46:00
ok visakh,
but i heard that there is difference between these two in oracle.And I think as part of structured query language conventions we have these key words in sql server.

Thanks all
Go to Top of Page

eyechart
Master Smack Fu Yak Hacker

3575 Posts

Posted - 2008-04-07 : 10:02:43
quote:
Originally posted by soorajtnpki

ok visakh,
but i heard that there is difference between these two in oracle.And I think as part of structured query language conventions we have these key words in sql server.

Thanks all



the OUTER keyword is optional in Oracle as well, so there is no difference between LEFT OUTER JOIN and LEFT JOIN when using Oracle.



-ec
Go to Top of Page

soorajtnpki
Posting Yak Master

231 Posts

Posted - 2008-04-08 : 00:29:30
ok then why there is left join and left outer join in sql ???? pls clarify if u know..
thanks
Go to Top of Page

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2008-04-08 : 01:08:54
there is no good reason. the OUTER keyword is optional and that's that. just accept it and move on.



elsasoft.org
Go to Top of Page

mudassir_k
Starting Member

1 Post

Posted - 2008-06-03 : 15:42:29
In SQL Server 2000 we have three types of joins
1. Inner join
2. Outer Join
3. Cross Join
1. Inner Join: Inner Join is the default type of join, it
will producesses the result set, which contains matched
rows only.
syntax: select * from table1<innerjoin>table2

2. Outer Join: Outer join produces the results, which
contains matched rows and unmatched rows.
here we have three types of joins,
1.Left Outer Join 2.Right Outer Join 3.Full Outer Join
Left Outer Join: Left Outer Join producesses the results,
which contains all the rows from Left table and matched
rows from Right Table.
syntax: select * from table1<leftouterjoin>table2

Right Outer Join: Right Outer Join producesses the
resultset, which contains all the rows from right table and
matched rows from left table.
syntax:select * from table1<right outer join>table2

Full Outer Join: Full Outer Join producesses the resultset,
which contains all the rows from left table and all the
rows from right table.
syntax:select * from table1<fullouterjoin>table2

3.Cross Join: A join without having any condition is known
as Cross Join, in cross join every row in first table is
joins with every row in second table.
syntax: select * from table1<cross join>table2

Self Join: A join joins withitself is called self join
working with self joins we use Alias tables.
Go to Top of Page

Vinnie881
Master Smack Fu Yak Hacker

1231 Posts

Posted - 2008-06-03 : 21:19:47
So what is the differance between a left join and left outer join j/k

Did this post get repetitive?
Go to Top of Page

Tharindu
Starting Member

5 Posts

Posted - 2008-07-16 : 01:38:54
quote:
Originally posted by soorajtnpki

Is there any difference between left join and left outer join in sql server 2000?please reply with example if any?
Thanks in advance



Yes I’m also can’t find out is there any differences and I hope there has any performance issue but still can’t find out solid answer. Yes we can ignore “Inner” (Ex: join and inner join) and “outer” (Ex: left join and left outer join) or we can use it nothing different both are gives same answers.

Tharindu Dhaneenja
http://spaces.msn.com/dhaneenja
http://spaces.msn.com/dhaneenja
Go to Top of Page

elancaster
A very urgent SQL Yakette

1208 Posts

Posted - 2008-07-16 : 03:36:35
quote:
Originally posted by Tharindu

quote:
Originally posted by soorajtnpki

Is there any difference between left join and left outer join in sql server 2000?please reply with example if any?
Thanks in advance



Yes I’m also can’t find out is there any differences and I hope there has any performance issue but still can’t find out solid answer. Yes we can ignore “Inner” (Ex: join and inner join) and “outer” (Ex: left join and left outer join) or we can use it nothing different both are gives same answers.

Tharindu Dhaneenja
http://spaces.msn.com/dhaneenja
http://spaces.msn.com/dhaneenja



...after reading the above answers, are you seriously asking what the difference is?
quote:

snSQL Posted - 04/07/2008 : 00:47:44
No difference, the keyword OUTER is optional.

quote:

visakh16 Posted - 04/07/2008 : 02:31:49
They are the same. OUTER is an optional word. LEFT JOIN or LEFT OUTER JOIN is one and the same thing.

quote:

eyechart Posted - 04/07/2008 : 10:02:43
the OUTER keyword is optional in Oracle as well, so there is no difference between LEFT OUTER JOIN and LEFT JOIN when using Oracle.


quote:

jezemine Posted - 04/08/2008 : 01:08:54

there is no good reason. the OUTER keyword is optional and that's that. just accept it and move on.



Em
Go to Top of Page
   

- Advertisement -