Oracle SQL - Changing Width of Alphanumeric and Numeric Columns


The following code demonstrates how you can narrow (or widen) the display of alphanumeric columns on your screen by using the FORMAT option of the COLUMN command.

select * from courses
where  category = 'BLD';

COLUMN description FORMAT a26

All SQL*Plus commands and their optional components can be abbreviated.

For example, the COLUMN command can be abbreviated to COL, and FORMAT can be abbreviated to FOR.

You can change the width of numeric columns as follows.

SQL> select * from salgrades
  2  where  grade > 3;

SQL> COL bonus FOR 9999.99
SQL> /

Related Topic