Name

SET HEADSEP

Synopsis

The HEADSEP setting changes the character used when defining a two-line column heading.

Syntax

SET HEADS[EP] heading_separator

Parameters

SET HEADS[EP]

Is the command, which may be abbreviated SET HEADS.

heading_separator

Is the new heading separator character, which may be used in subsequent COLUMN commands to mark line breaks in multiline column headings.

Examples

Normally, the heading separator is a vertical bar and marks the place in a column's heading where you want a line break to occur. The following example shows a two-line heading being defined:

SQL> COLUMN dummy FORMAT A10 HEADING 'Line 1 | Line 2'
SQL> SELECT * FROM dual;
Line 1
Line 2
----------
X

The vertical bar in the column's heading text was replaced by a line break when the column heading was printed. If you need to use the vertical bar as part of a column heading, use SET HEADSEP to choose some other character to act as the line break marker.

Tip

The line break in a heading is set when you first define that heading using the COLUMN command. Subsequently changing the heading separator character doesn't affect column headings you have defined.

Get Oracle SQL*Plus: The Definitive Guide, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.