Search notes:

SQL*Plus: COLUMN

create table tq84_column_width (
  col_1        number,
  col_2        varchar2(500)
);

insert into tq84_column_width values (1.049090920, 'alkdjfaj ladjkj kjnvoak zoijuwjd zoijd gh\amd');
insert into tq84_column_width values (7489899.409, '*132'                                         );


column col_1   format  999.99
column col_2   format  a30


select * from tq84_column_width;
--
--   COL_1 COL_2
-- ------- ------------------------------
--    1.05 alkdjfaj ladjkj kjnvoak zoijuw
--         jd zoijd gh\amd

drop table tq84_column_width purge;
Github repository Oracle-Patterns, path: /SQLPlus/column/width.sql

HEADING

heading sets a column's «title»
SQL> COLUMN abc HEADING txt
SQL> select 'foo bar baz' abc from dual;

txt
-----------
foo bar baz

WORD_WRAPPED

SQL> COLUMN xyz FORMAT A25 WORD_WRAPPED
SQL> select 'The first four numbers, spelled, are: one two three four. A word with more than twenty characters is Honorificabilitudinitatibus' as xyz from dual;

XYZ
-------------------------
The first four numbers,
spelled, are: one two
three four. A word with
more than twenty
characters is
Honorificabilitudinitatib
us

Show all defined formats

column without options shows all defined formates (among which some predefined ones are).

See also

COLUMN xxx FORMAT …
COLUMN colname NEWVALUE varname
SQL*Plus

Index