Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Re: Re: SQL JOINs vs WHERE statements

by NetWallah (Canon)
on Aug 18, 2003 at 05:29 UTC ( [id://284485]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: SQL JOINs vs WHERE statements
in thread SQL JOINs vs WHERE statements

I'm at the fringes of my SQL knowledge here (after all - my handle is NETWallah, not SQL-wallah). Anyway - Yes, AFAIK, the performance of both your SQL statements should be the same. To verify, you could have your SQL platform give you the SQL execution plan for each, and compare them.

Here is the (Thankfully brief) INNER join vs others explanation from Microsoft - it may provide a little insight into the choice of words:

INNER
Specifies that all matching pairs of rows are returned. Discards unmatched rows from both tables. This is the default if no join type is specified.

LEFT [ OUTER ]
Specifies that all rows from the left table not meeting the specified condition are included in the result set in addition to all rows returned by the inner join. Output columns from the left table are set to NULL.

RIGHT [ OUTER ]
Specifies that all rows from the right table not meeting the specified condition are included in the result set in addition to all rows returned by the inner join. Output columns from the right table are set to NULL.

FULL [ OUTER ]
If a row from either the left or right table does not match the selection criteria, specifies the row be included in the result set, and output columns that correspond to the other table be set to NULL. This is in addition to all rows usually returned by the inner join.

  • Comment on Re: Re: Re: SQL JOINs vs WHERE statements

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://284485]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2024-04-26 02:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found