Re: Linking against null-fields.

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Linking against null-fields.
Дата
Msg-id 006901c150df$e335d690$014ba8c0@myst.com
обсуждение исходный текст
Ответ на Linking against null-fields.  (Alexander Deruwe <a@deruwe.be>)
Список pgsql-sql
> SELECT f.ID, d.NAME FROM FILE f, DRIVER d WHERE (d.ID = f.DRIVER);
>
> However, the only reason I have this query set up as this is to get the
name
> of the driver easily, if one is set.
>
> How can this be helped? Should I just get the driver ID as a field, and
then
> do a second query on that?

I think this might work:
select f.ID, d.NAME from FILE f LEFT OUTER JOIN  DRIVER d ON(d.ID=f.DRIVER);



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com



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

Предыдущее
От: Janning Vygen
Дата:
Сообщение: Re: Problem with n to n relation
Следующее
От: "Josh Berkus"
Дата:
Сообщение: Re: Loading current_user and current_timestamp using COPY