Sql*Plus User’s Guide and Reference


Download 5.34 Mb.
Pdf ko'rish
bet81/103
Sana04.08.2023
Hajmi5.34 Mb.
#1665146
1   ...   77   78   79   80   81   82   83   84   ...   103
Bog'liq
E18404-12


Partners $13,500 .3
Errazuriz $12,000 .3
Cambrault $11,000 .3
Zlotkey $10,500 .2


Formatting Columns
Formatting SQL*Plus Reports
6-5
Default Display
The default width of datatype columns is the width of the column in the database. The 
column width of a LONG, BLOB, BFILE, CLOB, NCLOB or XMLType defaults to the 
value of SET LONGCHUNKSIZE or SET LONG, whichever is the smaller.
The default width and format of unformatted DATE columns in SQL*Plus is 
determined by the database NLS_DATE_FORMAT parameter. Otherwise, the default 
format width is A9. See the FORMAT clause of the 
COLUMN
 command on page 12-26 
for more information on formatting DATE columns.
Left justification is the default for datatypes.
Changing the Default Display
You can change the displayed width of a datatype or DATE, by using the COLUMN 
command with a format model consisting of the letter A (for alphanumeric) followed 
by a number representing the width of the column in characters.
Within the COLUMN command, identify the column you want to format and the 
model you want to use:
COLUMN 
column_name
FORMAT 
model
If you specify a width shorter than the column heading, SQL*Plus truncates the 
heading. See the 
COLUMN
 command on page 12-26 for more details.
Example 6–5
Formatting a Character Column 
To set the width of the column LAST_NAME to four characters and rerun the current 
query, enter
COLUMN LAST_NAME FORMAT A4
/
If the WRAP variable of the SET command is set to ON (its default value), the 
employee names wrap to the next line after the fourth character, as shown in 
LAST MONTHLY
NAME SALARY COMMISSION
---- -------- ----------
Russ $14,000 .4
ell
Download 5.34 Mb.

Do'stlaringiz bilan baham:
1   ...   77   78   79   80   81   82   83   84   ...   103




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling