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!

How to display "ename" (data type varchar2) in Initcap, Lower or Upper case...

MURTAZA IQBALFeb 15 2014 — edited Feb 18 2014

Hi,

I am new to ORACLE DBA and just started my training..

I know how to format "Columns" using sqlplus but my question is how can i display "ename" (from EMP table) in UPPER, lower or Initcap case by using "SELECT * "....???

I know the i can do it by writing select statement e.g

select

     empno,

     Lower (ename),

     etc

     etc

from

     emp;

and the above statement show me the result ename is converted into Lower case.

but suppose if table have too many columns and i just want to change name columen in initcap so how can i do that. I don't want to state each and every column in my select statement like above.

is there any way that i can use format column command with "Select *" statement.

e.g

col ename as initcap

select * from emp;

...????????

This post has been answered by AnnEdmund on Feb 15 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 18 2014
Added on Feb 15 2014
3 comments
445 views