help with a mutuality check (good query exercise :)

2005-03-29 Thread Gabriel B.
I got stuck in this one, and i belive there's a solution, i just don't happen to see it. i have a table with conections between itens. something like +---+---+ | A | B | +---+---+ | 1 | 2 | | 1 | 3 | | 1 | 4 | | 2 | 1 | +---+---+ i'm trying to solve with one query a way to get all of the

Re: help with a mutuality check (good query exercise :)

2005-03-29 Thread Alec . Cawley
select l.b, r.a = l.b from tab l join tab r on l.a = r.b where l.a = 1 ; seems to produce the result you want Gabriel B. [EMAIL PROTECTED] 29/03/2005 09:30 Please respond to Gabriel B. [EMAIL PROTECTED] To mysql@lists.mysql.com cc Subject help with a mutuality check (good query exercise