Customizing the Work Environment with SET Commands

SET commands in Oracle change SQL*Plus session settings. By using these commands, you can customize your SQL working environment and invoke options to make your output results more presentable. You can control many of the SET commands by turning an option on or off.

To see how the SET commands work, perform a simple SELECT:

SQL> select *
  2  from products;

PRO PRODUCT_NAME                   UNIT_COST
--- ------------------------------ ---------
P01 MICKEY MOUSE LAMP                  29.95
P02 NO 2 PENCILS - 20 PACK              1.99
P03 COFFEE MUG                          6.95
P04 FAR SIDE CALENDAR                   10.5
P05 NATURE CALENDAR                    12.99
P06 SQL COMMAND REFERENCE              29.99
P07 BLACK LEATHER BRIEFCASE            99.99

7 rows selected.

The last line of output

7 rows selected.

is called ...

Get Sams Teach Yourself SQL in 21 Days, Fourth Edition 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.