This thread also brings up the question... what ever happened to the *
notation of the SQL2 standard for LEFT and RIGHT outer joins?
To pull all rows from table 'a' and only those from table 'b' that match
the column criteria.
SELECT * FROM a, b WHERE a.x*=b.x;
To pull all rows from table 'b' and only those from table 'a' that match
the column criteria.
SELECT * FROM a, b WHERE a.x=*b.x;
This notation was always easy to remember when you think of the asterisk
as being a wildcard (or 'all') for its side of the expression.
Russ Brown wrote:
> Hello all,
>
> Recently a post on this list made me think a bit about the way in
> which I write my queries.
>
> I have always written queries with ordinary joins in this manner:
>
> SELECT * FROM a, b WHERE a.x=b.x;
>
> However I recently saw an laternative syntax:
>
> SELECT * FROM a JOIN b ON a.x=b.x;
>
> Is there any difference between these queries in terms of the speed
> of planning or the quality of the plan untimately used? I'd imagine
> that the second form provides more information that the planner may
> be able to use to make a better plan (or make a good plan more
> easily), but I've never had any problems with the first form.
>
> It also seems to me that the second form is more self-documenting,
> which is something I'm always in favour of.
>
> I'd appreciate anyone's thought/insight.
>
> Thanks.
>
--
Thanks,
Laura Vance
Systems Engineer
Winfree Academy Charter Schools
6221 Riverside Dr. Suite 110
Irving, Tx 75039
Web: www.winfreeacademy.com