patternsqlMinor
difference of left join and left outer join
Viewed 0 times
leftjoindifferenceandouter
Problem
In SQL Server join syntax we can use
LEFT JOIN or LEFT OUTER JOIN and query result with each of above join not difference. this is a question for me that which are more useful.Solution
There is no difference, they are absolutely 100% identical in function - the
You can see more details here:
MSDN : Using Outer Joins
and here:
MSDN : FROM (Transact-SQL)
The relevant bit in the latter document:
Specifies that all rows from the left table not meeting the join
condition are included in the result set, and output columns from the
other table are set to NULL in addition to all rows returned by the
inner join
The same description applies whether you use the
OUTER keyword is optional in the syntax. Personally I prefer LEFT OUTER JOIN as it's a bit more explicit.You can see more details here:
MSDN : Using Outer Joins
and here:
MSDN : FROM (Transact-SQL)
The relevant bit in the latter document:
LEFT [ OUTER ]Specifies that all rows from the left table not meeting the join
condition are included in the result set, and output columns from the
other table are set to NULL in addition to all rows returned by the
inner join
The same description applies whether you use the
OUTER keyword or not.Code Snippets
LEFT [ OUTER ]Context
StackExchange Database Administrators Q#19005, answer score: 9
Revisions (0)
No revisions yet.