SET Commands

You might have noticed the SET LINESIZE 70 command as the first line of most of the script files seen in this chapter. This command is used to tell Oracle to wrap the results to the next line after 70 characters. I used this command in order to get the results formatted for a portrait (8.5-by-11-inch) document. SQL*Plus has a number of environmental variables that can be used to change how SQL*Plus looks and operates. Some of these, like the LINESIZE variable, are used to format results. Table 11.7 describes the majority and most common of the SET command variables. A full list is available on

Table 11.7. SQL*Plus Environmental Variables
Name Description
APPI[INFO] Enables the registration of command files using the DBMS_APPLICATION_INFO ...

Get Oracle SQL and PL/SQL Handbook: A Guide for Data Administrators, Developers, and Business Analysts 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.