Re: union of types in a different category - Mailing list pgsql-general

From James Harper
Subject Re: union of types in a different category
Date
Msg-id 6035A0D088A63A46850C3988ED045A4B6F3AFF88@BITCOM1.int.sbss.com.au
Whole thread Raw
In response to union of types in a different category  (James Harper <james.harper@bendigoit.com.au>)
List 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 by date:

Previous
From: James Harper
Date:
Subject: union of types in a different category
Next
From: James Harper
Date:
Subject: Re: union of types in a different category