September 26, 2005 at 8:57 am
In a JOIN statement, I've always seen it look like:
FROM Table1
LEFT JOIN Table2 ON Table1.Id = Table2.Id
Is it possible to have a JOIN like this?
FROM Table1, Table2
LEFT JOIN Table2 ON Table1.Id = Table2.Id
LEFT JOIN Table3 ON Table2.Id = Table3.Id
Is this even possible?
Thanks much!
September 26, 2005 at 9:01 am
Yes but like this :
FROM Table1
LEFT OUTER JOIN Table2 ON Table1.Id = Table2.Id
LEFT OUTER JOIN Table3 ON Table2.id = Table3.Id
September 26, 2005 at 9:18 am
No, You are mixing the old t-sql join syntax and the ansi join syntax, they can't be mixed, its one or the other.
Use Pubs
select *
from authors a
join titleauthor b on a.au_id = b.au_id
select *
from authors a, titleauthor b
where a.au_id = b.au_id
you cannot mix the two different methods
September 26, 2005 at 9:28 am
Well you can... but you MUST expect errors if you do that, so don't .
September 26, 2005 at 9:41 am
Thanks guys...
does it need to be a LEFT OUTER JOIN? Or can I use INNER, LEFT, RIGHT, etc...
thank you!
September 26, 2005 at 9:47 am
Any type.
September 26, 2005 at 1:30 pm
In t-sql the Inner, or outer keyword is optional
inner join is the same as Join
Left Outer join is the same as left join.
I'm not sure if the ansi standards require inner/outer keyword
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply