Database Reference
In-Depth Information
Figure 8.16
Three Number
Column Format
Variations.
Now we can add formatting to the three number columns by typing
these lines and executing again:
COLUMN MINUTES_USED FORMAT 99,999.99
COLUMN AMOUNT_CHARGED FORMAT $999,990.00
COLUMN AMOUNT_PAID FORMAT $000,000.00
/
Figure 8.16 shows the result. A zero in a column format is a placeholder,
padding with zeros when the value is not as large as the format. The nine
collapses or trims the number, moving the $ sign, for example, to the right
so it is next to the number. The comma is only used when needed if you
have nines around it and will always be displayed if you have zeros around
it. See the SQL*Plus COLUMN command syntax in Oracle's documenta-
tion for a complete list of all the available formatting symbols for numbers.
Also see Chapter 9 for some detail on datatype conversion function format-
ting patterns.
 
Search WWH ::




Custom Search