Name

SET UNDERLINE

Synopsis

The SET UNDERLINE setting controls the character used to underline column headings. You can also control whether column headings are underlined at all.

Syntax

SET UND[ERLINE] {underline_char | {ON | OFF}}

Parameters

SET UND[ERLINE]

Is the command, which may be abbreviated SET UND.

underline_char

Is the character you want to use when underlining column headings. By default, a dash character (-) is used.

ON

Causes column headings to be underlined and resets the underline character back to the dash.

OFF

Keeps column headings from being underlined.

Examples

The following example shows the underline character being changed to an asterisk:

SQL> SET UNDERLINE *
SQL> SELECT USER FROM dual;
USER
******************************
JEFF

You can use SET UNDERLINE to turn off underlining:

SQL> SET UNDERLINE OFF
SQL> SELECT USER FROM dual;
USER
JEFF

One reason you might turn underlining off would be if you wanted some columns to print without any headings at all. First, you would turn UNDERLINE off. Then you would define column headings for all columns with the COLUMN command. Those headings you did want to print would need to include the underlines as part of the heading definition. Other headings would be defined as empty strings.

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.