SQL* Plus CLI  «Prev  Next»

Column format matching in Oracle

Here are the correct matches:
8,973.39 and -8,973.39 9,999.99
0,973.39 0,999.99
8,973.39- 9,999.99S
$8,973.39 $9,973.39
15-Nov-1961 A11
Brighten t
he corner
where you
are
A10
Brighten
the corner
where you
are
A10 WORD_WRAPPED
(123.45) and 678.90 (999.99)

SQL*Plus Date Format

The default date format in SQL*Plus is determined by the database NLS_DATE_FORMAT parameter and may use a date format displaying two digit years. You can use the SQL TO_CHAR function, or the SQL*Plus COLUMN FORMAT command in your SELECT statements to control the way dates are displayed in your report.

Character Columns

The default width of CHAR, NCHAR, VARCHAR2 (VARCHAR) and NVARCHAR2 (NCHAR VARYING) columns is the width of the column in the database. SQL*Plus formats these datatypes left-justified. If a value does not fit within the column width, SQL*Plus wraps or truncates the character string depending on the setting of SET WRAP.
A LONG, BLOB, BFILE, CLOB, NCLOB or XMLType column's width defaults to the value of SET LONGCHUNKSIZE or SET LONG, whichever one is smaller. SQL*Plus truncates or wraps XMLType columns after 2000 bytes. To avoid this you need to set an explicit COLUMN format for the XMLType column. A COLUMN format can be up to a maximum of 60000 per row.