[thelist] followup SQL question
Warden, Matt
mwarden at odyssey-design.com
Fri Sep 22 06:24:54 CDT 2000
> Is there any difference (speed, elegance, etc.) between these statements?
> The CF query builder seens to make the second, which seems wrong.
>
> SELECT * FROM Services INNER JOIN Operators ON Services.OperatorID =
> Operators.OperatorID
>
> SELECT * FROM Services WHERE Services.OperatorID = Operators.OperatorID
you have to include Operators in your FROM clause.
SELECT * FROM Services, Operators WHERE Services.OperatorID =
Operators.OperatorID
I prefer the second way for readability, but I've seen Rudy and many others
give examples using the first syntax, which makes me wonder. Ever seen this:
SELECT * FROM Services, Operators WHERE Services.OperatorID .=
Operators.OperatorID
did you see that dot before the = sign when you first read it? many people
don't, and if they do, they don't know what it means. there goes my
readability excuse. but, for inner joins, i do prefer the latter method.
--
mattwarden
mattwarden.com
More information about the thelist
mailing list