Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Alias in a UNION query

drbiloukosMay 18 2012 — edited May 18 2012
Hello people.
Since I could not find anything on Google, here is my simple question:

How can I use column alias in a UNION query. it seems that if I specify the alias it will not be displayed.

Ex:
SELECT * FROM
(
SELECT SYSDATE FROM DUAL
UNION ALL
SELECT SYSDATE FROM DUAL
)  TEST;
Column alias TEST will not be used.

Thank you in advance.
This post has been answered by BluShadow on May 18 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 15 2012
Added on May 18 2012
6 comments
7,440 views