| Article: |
More on JOINS | |
| Subject: | Right outer joins in MS SQL SERVER | |
| Date: | 2003-07-10 11:59:34 | |
| From: | anonymous2 | |
|
Response to: Right outer joins in MS SQL SERVER
|
||
| The first query works as a cross join because you are not telling the system what type of join you want to use. The second one is written properly. | ||
Showing messages 1 through 4 of 4.
-
Right outer joins in MS SQL SERVER
2006-01-28 23:31:14 JCrespin [View]



If you want to receive the same result that you receive with the right outer join query you have to define the join between titles and sales (see below)...
select a.au_id, b.title,
c.qty
from titleauthor a,
titles b,
sales c
where
(a.title_id =* b.title_id)
and (a.title_id =* c.title_id)
and (b.title_id = c.title_id)
order by a.title_id
That said, definitely use the second query.