Subject | Re: Union statement automatically adds 'DISTINCT'? |
---|---|
Author | Adam |
Post date | 2007-04-30T23:38:14Z |
>Hello Paul,
> I just wanted to make sure that I'm correct in my assumption of the
> union clause. I'm using FB 1.5.3.
Yes, union does remove duplicates, by design.
---
quoting: http://en.wikipedia.org/wiki/Union_%28SQL%29
In SQL the UNION operator combines the results of two SQL queries into
a single table of all matching rows. The two queries must have
matching fields and data types in order to join them. Any duplicate
records are automatically removed unless UNION ALL is used.
---
Firebird behaves consistently with the SQL standard and consistently
when compared to other DBMS. Union All will give you what you want.