Wrap is a feature of SQL Plus that can be set:
Wrap is a system variable that turns on or off (default) globally the truncating of the content outside the width of a line or column.
SET WRAP {ON|OFF}
where:
The line size is defined by the linesize system variable
By default, if a value does not fit within the column width, SQL*Plus wraps or truncates the character string depending on the setting of the WRAP system_variable. You can change this global behaviour by setting it on a column with the column command.
COLUMN column_name WRA[PPED] | WOR[D_WRAPPED] | TRU[NCATED]
where:
show linesize
linesize 100
set wrap on
show wrap
wrap : lines will be wrapped
Reports:
| | | Number | | | Avg
| | | of | Size | Size | Size
Total | Segment Name | Type | Seg | (Blocks) | (Kb) | (Kb)
----- | ------------------------------ | ------ | ------ | ---------- | ---------- | ----------
TOTAL | CAL_MONTH_SALES_MV | TABLE | 1 | 8 | 64 | 64
| CHANNELS | TABLE | 1 | 8 | 64 | 64
| COSTS | PART | 16 | 16384 | 131072 | 8192
| COUNTRIES | TABLE | 1 | 8 | 64 | 64
| CUSTOMERS | TABLE | 1 | 1664 | 13312 | 13312
| DIMENSION_EXCEPTIONS | TABLE | 1 | 8 | 64 | 64
| DR$SUP_TEXT_IDX$I | TABLE | 1 | 8 | 64 | 64
| DR$SUP_TEXT_IDX$R | TABLE | 1 | 8 | 64 | 64
| FWEEK_PSCAT_SALES_MV | TABLE | 1 | 72 | 576 | 576
| PRODUCTS | TABLE | 1 | 8 | 64 | 64
| PROMOTIONS | TABLE | 1 | 64 | 512 | 512
| SALES | PART | 16 | 16384 | 131072 | 8192
| SUPPLEMENTARY_DEMOGRAPHICS | TABLE | 1 | 512 | 4096 | 4096
| TIMES | TABLE | 1 | 64 | 512 | 512
set linesize 60
set wrap off
show wrap
wrap : lines will be truncated
truncating (as requested) before column Size (Blocks)
truncating (as requested) before column Size (Kb)
truncating (as requested) before column Avg Size (Kb)
| | | Number
| | | of
Total | Segment Name | Type | Seg
----- | ------------------------------ | ------ | ------
TOTAL | CAL_MONTH_SALES_MV | TABLE | 1
| CHANNELS | TABLE | 1
| COSTS | PART | 16
| COUNTRIES | TABLE | 1
| CUSTOMERS | TABLE | 1
| DIMENSION_EXCEPTIONS | TABLE | 1
| DR$SUP_TEXT_IDX$I | TABLE | 1
| DR$SUP_TEXT_IDX$R | TABLE | 1
| FWEEK_PSCAT_SALES_MV | TABLE | 1
| PRODUCTS | TABLE | 1
| PROMOTIONS | TABLE | 1
| SALES | PART | 16
| SUPPLEMENTARY_DEMOGRAPHICS | TABLE | 1
| TIMES | TABLE | 1
To print a line of dashes after each wrapped column value, enter the commands:
SET RECSEP WRAPPED
SET RECSEPCHAR "-"
where: