Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: retrieving only the column label
select column_name from user_tab_columns where table_name = 'MY_TABLE'; (and see your docu for all the useful and well documented views: user_tables, user_tab_columns, etc.)
Hth, Christoph.
"Lee, Seung K." wrote:
> Good day group...
>
> here's my problem
>
> All I want the query to return is just the column label,
> preferably with a delimiter I can assign.
>
> Let me elaborate.
> I have
>
> select col1 as NAME, col2 as EMAIL from TABLE;
>
> it would give
>
> NAME EMAIL
> ---------------------------------
> Leee Lee_at_somewhere.com
> ........
> ........
>
> I just want "NAME and EMAIL". Straight forwardly anything after AS.
> If possible with a delimeter ,(comma)
> which would give name,email. Don't need the query result.
>
> I need this because we're working with various databases and
> they have different column name for obviously same content
> and we want to unify it.
> We're doing this with a c program. I guess I can string compare
> the query sentence and pick out the aliases
> but I thought there must be a better way...
>
> Well~ if this is a one of those question that always comes up...
> My apologies but I've really gone though the doc's I've got.
> TIA
Received on Sat Mar 10 2001 - 15:58:43 CST
![]() |
![]() |