Re: JOIN in the same table

2004-10-07 Thread Remi Mikalsen
This should work. No sub-selects needed here. select a.people_name, b.people_name as people_friend_name from people a, people b where a.people_friend_ID=b.people_ID Remi Mikalsen E-Mail: [EMAIL PROTECTED] URL:http://www.iMikalsen.com On 7 Oct 2004 at 10:34, Ronan Lucio wrote: > Hi, > > I

Re: JOIN in the same table

2004-10-07 Thread Mark T. Dame
Ronan Lucio wrote: Hi, I have a situation like this: Table People = people_ID people_name people_friend_ID people_friends_ID is the people_ID from another record. Is there a way to make a SELECT that returns people_name and people_friend_name? SELECT p1.people_name,p2.people_name FROM Peopl

JOIN in the same table

2004-10-07 Thread Ronan Lucio
Hi, I have a situation like this: Table People = people_ID people_name people_friend_ID people_friends_ID is the people_ID from another record. Is there a way to make a SELECT that returns people_name and people_friend_name? Perhaps I´d get this with sub-selects but I´m using MySQL-4.0