Re: Question About UNION

Поиск
Список
Период
Сортировка
От Raymond O'Donnell
Тема Re: Question About UNION
Дата
Msg-id 48EE34EA.5090608@iol.ie
обсуждение исходный текст
Ответ на Question About UNION  (Bill Thoen <bthoen@gisnet.com>)
Ответы Re: Question About UNION  (Bill Thoen <bthoen@gisnet.com>)
Список pgsql-general
On 09/10/2008 17:36, Bill Thoen wrote:
> I'm trying to combine two tables, but I only want unique records based
> on the first two columns. Can UNION be used to join three-column tables
> but only include records based on the uniqueness of the first two
> columns? If not, how would I do this with PostgreSQL 8.1?

How do you decide which records you want? - e.g. given the following rows...

  (a, b, c)
  (a, b, d)

...how do you decide whether you the one with c or the one with d?

Ray.

------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------

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

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Re: [Pkg-postgresql-public] Postgres major version support policy on Debian
Следующее
От: Bill Thoen
Дата:
Сообщение: Re: Question About UNION