Re: union of types in a different category

Поиск
Список
Период
Сортировка
От James Harper
Тема Re: union of types in a different category
Дата
Msg-id 6035A0D088A63A46850C3988ED045A4B6F3AFF88@BITCOM1.int.sbss.com.au
обсуждение исходный текст
Ответ на union of types in a different category  (James Harper <james.harper@bendigoit.com.au>)
Список pgsql-general
>
> Interestingly - & i'm curious as to why"
>
> SELECT '1' UNION SELECT 2;
>  ?column?
> ----------
>         1
>         2
> (2 rows)
>
> SELECT '1' UNION SELECT 1;
>  ?column?
> ----------
>         1
> (1 row)
>
>
> I didn't think UNION did an explicit "distinct" - if that is what is happening?
>

UNION removes duplicates. UNION ALL does not.

James


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

Предыдущее
От: James Harper
Дата:
Сообщение: union of types in a different category
Следующее
От: James Harper
Дата:
Сообщение: Re: union of types in a different category