5

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.

9

There is no difference, they are absolutely 100% identical in function - 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.