Skip to Main Content
Oracle in a Nutshell
book

Oracle in a Nutshell

by Rick Greenwald, David C. Kreines
December 2002
Intermediate to advanced content levelIntermediate to advanced
928 pages
85h 29m
English
O'Reilly Media, Inc.
Content preview from Oracle in a Nutshell

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 ...

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.
Start your free trial

You might also like

Oracle Internals

Oracle Internals

Donald K. Burleson
Oracle PL/SQL

Oracle PL/SQL

Lewis Cunningham
Oracle Essentials: Oracle9i, Oracle8i and Oracle8, Second Edition

Oracle Essentials: Oracle9i, Oracle8i and Oracle8, Second Edition

Rick Greenwald, Robert Stackowiak, Jonathan Stern

Publisher Resources

ISBN: 0596003366Errata Page