Re: Changing Column names
Date: 1996/06/18
Message-ID: <31C708A1.75C7_at_us.oracle.com>#1/1
Aditya Sharma wrote:
>
> RISHI ANAND wrote:
> >
> > Hi everyone,
> >
> > I just had a question regarding changing the headings of the column
> > names in oracle SQL.
> > For example, if we have table that has different columns with headings
> > like NAME, ADDRESS, ID, etc..and I want to change the 'NAME' field to
> > something else like 'EMP_NAME', then how would I go about doing that.
> > Please let me know.
> > Thanks.
> > --
> > **RISHI**
> >
> > *********Never tell a lie unless it is absolutely convenient.**********
>
> Rishi,
>
> If you are interested in changing the column heading while querying;
> in SQL*Plus, one can assign an alias to the columns being selected.
> Your query should look like :
> SELECT NAME 'EMP_NAME', ADDRESS 'EMP_ADD', ...
> FROM ....
>
> Aditya.
Small error - if you use the single quotes you will get an error. For column names you must use double quotes. Single quotes are used for string literals only.
-- ____________________________________________ / Kenichi Mizuta / Oracle Corporation (Redwood Shores, CA) / Applications Division //// / email: kmizuta_at_us.oracle.com |0 0| / tel: 1-415-506-0390 _ooO_ \U/_Ooo_/ fax: 1-415-506-7801Received on Tue Jun 18 1996 - 00:00:00 CEST