Re: [GENERAL] How do you live without OUTER joins?
От | Herbert Liechti |
---|---|
Тема | Re: [GENERAL] How do you live without OUTER joins? |
Дата | |
Msg-id | 387C3339.86CA7717@thinx.ch обсуждение исходный текст |
Ответ на | Re: [GENERAL] How do you live without OUTER joins? (admin <admin@wtbwts.com>) |
Список | pgsql-general |
Bruce Bantos wrote: > > > I'm not sure if this is what you're looking for, but you can try: > > select company_category.com_cat_long, company.company_name from > > company_category, company where > > company_category.com_cat_abbr=company.com_cat_abbr; > > A simple join like that will inlcude only the company records with a > com_cat_abbr equal to an entry in the company_category table. You would not > get all the records in the company table. In the example below, you would > only get records for Microsoft and the United Way...the Coca Cola entry > would not be included in the query. Thus the need for outer joins.... You may solve the problem with a union select by selecting the joined records in the first statement and the remaining records in the second statement. -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Herbert Liechti E-Mail: Herbert.Liechti@thinx.ch ThinX networked business services Stahlrain 10, CH-5200 Brugg ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
В списке pgsql-general по дате отправления: