Re: Table joining problem.

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

Perhaps:

select user.nick, users.number from users, teams
  where users.number = teams.owner and
  not exists (select * from challenge where challenge.who = users.number);

Regards,

Giles

В списке pgsql-novice по дате отправления:

Предыдущее
От: Milen
Дата:
Сообщение: batch file
Следующее
От: Nabil Sayegh
Дата:
Сообщение: Re: inserting values like in mySQL