Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: format of the output

Re: format of the output

From: Mark C. Stock <mcstockX_at_Xenquery>
Date: Tue, 24 Feb 2004 16:12:57 -0500
Message-ID: <vdWdnboPlaA9I6bdRVn-gw@comcast.com>

"Vu Pham" <vu_at_sivell.com> wrote in message news:c1ge5r$1id6bc$1_at_ID-219297.news.uni-berlin.de...
| Two of the fields in my table are NAME CHAR(30) and SECTION CHAR(1)
|
| The following SQL produces the corresponding result;
| -----------------------------------------------
| SQL> select name, section from tablea;
|
| NAME S
| ------------------------------ -
| User 0 S
| User 1 E
| User 2 M
| ------------------------------------------------
|
| Is there anyway to control the field width of the output, something that
can
| give me a result like ?
| NAME SECTION
| -------------- -----------
| User 0 S
| User 1 E
| User 2 M
|
|
| Thanks,
|
| Vu
|
|

you need the SQL*Plus COLUMN command, ie

column name format a14
column section format a7

note that these commands are in affect for the duration of the SQL*Plus session (until you exit the tool) or until they are reset -- they are not tied to a specific SQL statement, so they will be applied to the results of any column with the specified name

check out the SQL*Plus guide for a lot more interesting settings

;-{ mcs Received on Tue Feb 24 2004 - 15:12:57 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US