Table joining problem.

Поиск
Список
Период
Сортировка
От GCS
Тема Table joining problem.
Дата
Msg-id Pine.LNX.3.96.1010526221516.26851C-100000@c64.rulez.org
обсуждение исходный текст
Ответы Re: Table joining problem.  (Giles Lean <giles@nemeton.com.au>)
Список 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 по дате отправления:

Предыдущее
От: Johan Daine
Дата:
Сообщение: Re: LIKE upper('%$info%') -- (like google)
Следующее
От: Johan Daine
Дата:
Сообщение: Re: LIKE upper('%$info%') -- (like google)