
You must enclose the dash in quotation marks otherwise, SQL*Plus interprets the dash as a hyphen indicating that you wish to continue the command on another line. Now change the underline character back to a dash: To change the character used to underline headings to an equal sign and rerun the query, enter the following commands: To change the character used to underline each column heading, set the UNDERLINE variable of the SET command to the desired character.Įxample 4-3 Setting the Underline Character Now rerun the query with the slash (/) command: SQL> COLUMN ENAME HEADING 'Employee|Name' To give the column ENAME the heading EMPLOYEE NAME and to split the new heading onto two lines, enter See the SET command in Chapter 8 for more information.)

(You can use a character other than a vertical bar by changing the setting of the HEADSEP variable of the SET command. To display a column heading on more than one line, use a vertical bar (|) where you want to begin a new line. To change a column heading to two or more words, enclose the new heading in single or double quotation marks when you enter the COLUMN command. The new headings will remain in effect until you enter different headings, reset each column's format, or exit from SQL*Plus. To produce a report from EMP with new headings specified for DEPTNO, ENAME, and SAL, enter the following commands: See the COLUMN command in Chapter 8 for more details. You can define a more useful column heading with the HEADING clause of the COLUMN command, in the format shown below:ĬOLUMN column_name HEADING column_heading Column names are often short and cryptic, however, and expressions can be hard to understand. SQL*Plus uses column or expression names as default column headings when displaying query results. The sections below describe how the default headings are derived and how you can alter them with the COLUMN command. When displaying column headings, you can either use the default heading or you can change it using the COLUMN command. Through the SQL*Plus COLUMN command, you can change the column headings and reformat the column data in your query results.
