Guide to Oracle SQL (University at Buffalo Version)
Formatting Result Sets
Using 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.
Command | Description |
---|---|
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. |
SET = | Changes the underline from a hyphen (- ) to an equal sign (= ). |
TTITLE "Report Title" | Places a title before the report output. |