Appendix C. Numeric Formats
This appendix summarizes the numeric format elements that may be used in a variety of Oracle tools (e.g., SQL*Plus), in the built-in packages, and in format specifications within SQL statements.
Table C-1 lists all numeric format elements. Table C-2 contains examples illustrating the use of many of these elements
Table C-1. Numeric format elements
Formatelement |
Function |
---|---|
9 |
Represents a digit in the output. |
0 |
Marks the spot at which you want to begin displaying leading zeros. |
$ |
Includes a leading dollar sign in the output. |
, |
Places a comma in the output. |
. |
Marks the location of the decimal point. |
B |
Forces zero values to be displayed as blanks. |
C |
Marks the place where you want the ISO currency indicator to appear. For U.S. dollars, this will be USD. |
D |
Marks the location of the decimal point. |
MI |
Adds a trailing negative sign to a number and may be used only at the end of a format string. |
S |
Adds a + or - sign[a] to the number and may be used at either the beginning or end of a format string. |
PR |
Causes negative values to be displayed within angle brackets. For example, -123.99 will be displayed as <123.99>. |
G |
Places a group separator (usually a comma) in the output. |
L |
Marks the place where you want the local currency indicator to appear. For U.S. dollars, this will be the dollar sign character. |
V |
Displays scaled values. The number of digits to the right of the V indicates how many places to the right the decimal point ... |
Get Oracle in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.