Question:
When I select a column in
SQL*Plus, it is padded with 32 spaces:
SQL>
select
'a' from dual;
'
-
a
How do I change the
default display width for a column?
Answer:
In SQL*Plus, the default width of all character columns (VARCHAR2) is
the width of the column in the database. The default column
width may also depend on the character set that you have set in
SQL*Plus, or in the database.
You can control the
display width of any column in SQL*Plus with the "column" command.
For example:
column mycol format a1
select 'a' mycol from dual;
column mycol format a30
select 'a' mycol from dual;
FYI, there is a good
book on using SQL*Plus,
Easy SQL*Plus Reporting by John Garmany.