Name
SET NUMFORMAT
Synopsis
The NUMFORMAT setting specifies the default formatting of numeric values returned from a SELECT statement. Any number format usable with the COLUMN command may also be used with SET NUMFORMAT.
Syntax
SET NUMF[ORMAT] format_specParameters
- SET NUMF[ORMAT]
Is the command, which may be abbreviated SET NUMF.
- format_spec
Is a numeric format specification, which controls the default manner in which numeric values are displayed. See Appendix B for a list of formats.
Examples
The following example shows the effect of changing the NUMFORMAT setting:
SQL> SELECT 123456.7 FROM dual; 123456.7 --------- 123456.7 SQL> SET NUMFORMAT $999,999.99 SQL> SELECT 123456.7 FROM dual; 123456.7 ------------ $123,456.70
The NUMFORMAT setting controls the default display format for numeric values. You can use the COLUMN command to specify display formats on a column-by-column basis, and those take precedence over the NUMFORMAT setting.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access