Name

SET HEADING

Synopsis

The HEADING setting controls whether column headings print when you SELECT or PRINT data. The default value for this setting is ON, which allows column headings to print.

Syntax

SET HEA[DING] [ON | OFF]

Parameters

SET HEA[DING]

Is the command, which may be abbreviated SET HEA.

ON

Causes column headings to print when you select data.

OFF

Suppresses column headings.

Examples

This setting is on by default, so you normally get a column heading whenever you select or print data using the SELECT statement or the PRINT command:

SQL> SELECT * FROM dual;
D
-
X

Change the value to OFF and your column headings go away. The following example shows this:

SQL> SET HEADING OFF
SQL> SELECT * FROM dual;
X

Tip

Issuing a SET PAGESIZE 0 command also turns off headings. If you want to enable headings and SET HEADING ON doesn't appear to be working, you should check the pagesize as well.

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.