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 set column width based on header width?

leonhardtkAug 23 2010 — edited Aug 23 2010
I have a column that will only hold 1 character. This is good, but I want the Column width to match the column header.

For example,

Currently I get:

select * from table;

I NAME
- ---------
1 ROBERT

The problem is, I want the Column header spelled out (in this case it's just ID)

ID NAME
-- ---------
1 ROBERT

Better Yet,

if i did:

select ID "ID NUMBER", NAME "FIRST NAME" from table;

I'd like to see:

ID NUMBER FIRST NAME
--------------- -----------------
1 ROBERT

(Centering the ID within the Column width would be good too, but that is "gravy")

Any thoughts? I've been trying:

COLUMN ID FORMAT A10 (which obviously didn't work!)

Thanks,

KSL.

Edited by: leonhardtk on Aug 23, 2010 11:55 AM
This post has been answered by user13117585 on Aug 23 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 20 2010
Added on Aug 23 2010
9 comments
1,474 views