Table joining problem. - Mailing list pgsql-novice

From GCS
Subject Table joining problem.
Date
Msg-id Pine.LNX.3.96.1010526221516.26851C-100000@c64.rulez.org
Whole thread Raw
Responses Re: Table joining problem.
List pgsql-novice
Hi,

 I am not really novice, but not good either. I have a problem if the
table is empty, my select does not return anything then.
I have three tables,
1. users(nick varchar(),number int serial)
2. teams(owner references users)
3. challange(who references users)
I want to get all the users, who has a team, but not yet in the challange
table:
select users.nick, users.number from users, teams, challange where
teams.owner=users.number and challange.who!=users.number;
It does not return anything if the challange table is empty. If I insert a
line into it, it is ok. Can anyone help me out?

select users.nick, users.number from users, teams where
 teams.owner=users.number;
works correctly ofcourse, but I _must_ check the challange table too.

Any help is greatly appreciated,
Laszlo Boszormenyi,jr.


pgsql-novice by date:

Previous
From: Johan Daine
Date:
Subject: Re: LIKE upper('%$info%') -- (like google)
Next
From: Johan Daine
Date:
Subject: Re: LIKE upper('%$info%') -- (like google)