SQL*Plus User's Guide and Reference
CHAPTER 4. Formatting Query Results
This chapter explains how to format your query results to produce a finished report. This chapter covers the following topics:
- formatting NUMBER, CHAR, VARCHAR2 (VARCHAR), LONG, DATE, and Trusted Oracle columns
- copying, listing, and resetting column display attributes
- suppressing duplicate values and inserting space for clarity
- calculating and printing summary lines (totals, averages, minimums, maximums, and more)
- listing and removing spacing and summary line definitions
- placing titles at the top and bottom of each page
- displaying column values and the current date or page number in your titles
- listing and suppressing page title definitions
- placing headers and footers at the beginning and end of reports
- sending query results to a file or printer
Read this chapter while sitting at your computer and try out the examples shown. Before beginning, make sure you have access to the sample tables described.