| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Re: change column "labels" using select command
you can do this two ways. First, directly inside the SQL*Plus select
statement, like this:
select a NameA, b NameB, c NameC from xtable;
should return
> NAMEA NAMEB NAMEC
> ===== ====== =======
> AAA BBB CCC
If you want to get fancier, you can write a SQL script and use some SQL
formatting:
col a format a8 heading "NameA" col b format a8 heading "NameB" col c format a8 heading "NameC"
select a, b, c from xtable;
should return
> NameA NameB NameC
> ======== ======== ========
> AAA BBB CCC
note that using the heading method SQL adheres to case, provided you
place the heading inside double-quotes. Otherwise it would capitalize
everything.
HTH,
Roy
In article <7udva4$s54$1_at_tilde.csc.ti.com>,
mpatel_at_news.fhlb.com (Manny) wrote:
> How do I change column Name while doing select command for report.
>
> for example:
>
> select a, b, c from xtable;
>
> output:
>
> A B C
> ===== ====== =======
> AAA BBB CCC
>
> I need following output:
>
> Namex Namey Namez
> ===== ====== =======
> AAA BBB CCC
>
> thanks!
>
> Manny
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Mon Oct 18 1999 - 15:16:50 CDT
![]() |
![]() |