db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "RPost" <rp0...@pacbell.net>
Subject Re: Documentation vs. Actual behavior with UNION/INTERSECT/EXCEPT
Date Wed, 29 Jun 2005 01:35:53 GMT
> Army wrote:

> When the SelectExpression appears in a UNION, INTERSECT,
> or EXCEPT operator, the names from the first SelectExpression
> are taken as the names for the columns in the result of
> the operation.
>
> But this doesn't appear to be true.  Ex:
>
> ij> select a from t1 union select b from t2;
> 1 // This "1" should be "A", according to doc.
> -----------
>
> So what needs to be corrected here?  The documentation or the code?
>

The code needs to be corrected. The documentation is correct.

The rule explained by the doc is also why expressions in the first
SelectExpression need to have aliases whereas expressions in the subsequent
SelectExpressions do not require aliases.


Mime
View raw message