Syntax question

Поиск
Список
Период
Сортировка
От John Taylor
Тема Syntax question
Дата
Msg-id 20060526160925.61343.qmail@web53504.mail.yahoo.com
обсуждение исходный текст
Ответы Re: Syntax question  (Bruno Wolff III <bruno@wolff.to>)
Re: Syntax question  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
Re: Syntax question  (David Fetter <david@fetter.org>)
Список pgsql-general
I have a select statement that goes as follows:

SELECT * FROM product prod, prod_alias pa, category cat, company co
WHERE prod.catid = cat.catid
AND prod.coid = co.coid
AND prod.prodid = pa.prodid;

If possible, I want to change the statement so that I get output regardless of whether there's a match between prod.prodid and pa.prodid. IOW, if there's a match between prod.prodid and pa.prodid, I want the output from both the product table and the prod_alias table.  if there's no match, I still want the output from product table. Can I do this in one select statement?

Thanks,

Don


Ring'em or ping'em. Make PC-to-phone calls as low as 1¢/min with Yahoo! Messenger with Voice.

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

Предыдущее
От: Rafal Pietrak
Дата:
Сообщение: Re: RES: LDAP authentication
Следующее
От: Jorge Godoy
Дата:
Сообщение: Re: LDAP authentication