Re: joins



David Portas (REMOVE_BEFORE_REPLYING_dportas@xxxxxxx) writes:
In cases where an inner and outer join are guaranteed to give the same
result I suggest you test it out for yourself.

And in that case, I expect the optimizer to see that the left join is
really an inner join, and thus you would get the same query plan.

The question is simply not meaningful, since, as David pointed, the
difference lies in functionality.


--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.



Relevant Pages

  • Re: Strange Performance question
    ... > FROM tranzbranch_archive.dbo.tblConsignment c WITH (NOLOCK) ... The optimizer in SQL 2000 optimizes an entire batch at a time. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)
  • Re: many "or" operation make system choose incorrect index
    ... different index plan. ... When there are 63 OR operators, the optimizer ... Books Online for SQL Server 2005 athttp://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books ... ...
    (comp.databases.ms-sqlserver)
  • Re: Why Same query results in two different # in SQL Server vs MS Access
    ... just have inner join. ... MON and Reasons. ... Is that what causing Access to return more results vs SQL Server? ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)
  • Re: difference between explicit inner join and implicit
    ... is there any difference between the JOIN operator and the INNER JOIN ... the USING syntax does not appear in MS SQL Server (which is the ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)
  • Re: Combining 3 SQL statements
    ... > INNER JOIN ... FROM headers h ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)