Re: left/right join concept

2008-03-01 Thread Rob Wultsch
Somewhat tangential, but for whatever it is worth I agree with the view expressed at http://weblogs.sqlteam.com/jeffs/archive/2008/02/13/on-right-outer-joins.aspx: Right joins should be avoided (IMHO). > Anything to add or correct, please? -- Rob Wultsch -- MySQL General Mailing List For lis

Re: left/right join concept

2008-03-01 Thread Brent Baisley
That sounds like the technical answer. I prefer an analogy a 5th grader could understand. If you have 2 overlapping circles, and inner join is the area that overlaps. A left/outer join is the all of the left circle plus the content of the right circle that overlaps. A right/outer join is ju

left/right join concept

2008-03-01 Thread Thufir
I'm trying to understand the terminology a bit. A left or right join can only exist for an outer join. For an inner join, the terminology would be out of context because inner joins are symmetrical (whereas outer joins are asymmetrical). Would this be a correct understanding? Anything to add

Re: left & right join?

2006-05-23 Thread Cal Evans
John, Union the 2 together. select r.room_num, count(p.peopid) from rooms r left join people p on r.roomid=p.roomid1 group by r.room_num UNION select r.room_num, count(p.peopid) from rooms r right join people p on r.roomid=p.roomid1 group by r.room_num or something like that. Should give you 2

left & right join?

2006-05-23 Thread John Heim
I need to write a query that essentially does both a left and right join. I have a list of people and the rooms they occupy. Some rooms have no people. Some people have no room assigned. This gives me a list of rooms and how many people are in each room including any rooms with nobody in th

Re: LEFT/RIGHT Join?

2002-03-12 Thread ds
Try: select t1.player,t1.game,t1.points,t1.ppg,t2.team as team_name from sc_scoreleaders as t1 left join sc_seasonstanding as t2 ON t1.team=t2.id You don't need to join sc_scoreleaders 2 times... Better: select t1.player,t1.game,t1.points,t1.ppg, ifnull(t2.team,"No Team") as team_name

LEFT/RIGHT Join?

2002-03-11 Thread Johnny Withers
So, it's been a while since I've actaully needed to do this and I can not for the life of me figure this out, maybe it's because I've been working for nine hours w/o getting up. Here it is: I have two tables, one table holds Team information, the other table holds top scorers. However, sometimes