Guide to Oracle SQL (University at Buffalo Version)
Formatting Result Sets
SELECT statements can produce output that is needed by other people. Oracle SQL provides a robust commands that allow you to control the number of lines, the width of the page, column headings, column widths, and report title, just to name a few.
|BREAK ON column
|Display data one time and then blanks in place of duplicate values.
|COLUMN column CLEAR
|Clears a previously defined column format or heading.
|COLUMN column FORMAT format
|Format the data based on the format parameter.
|COLUMN column HEADING "text"
|Similar to using a column alias.
|SET PAGESIZE number
|Number of lines before a page break.
|SET LINESIZE number
|Width of a report line.
|Changes the underline from a hyphen (
-) to an equal sign (
|TTITLE "Report Title"
|Places a title before the report output.