SQL*Plus User's Guide and Reference Release 9.2 Part Number A90842-01 |
|
This appendix covers earlier versions of some SQL*Plus commands. While these older commands still function within SQL*Plus, they are no longer supported. It is recommended that you use the alternative SQL*Plus commands listed in the following table.
Obsolete commands are available in current releases of SQL*Plus. In future releases, they may only be available by setting the SQLPLUSCOMPATIBILITY variable. You should modify scripts using obsolete commands to use the alternative commands.
Obsolete Command |
Alternative Command |
Description of Alternative Command |
---|---|---|
Places and formats a title at the bottom of each report page or lists the current BTITLE definition. |
||
COLUMN CLE[AR] |
Resets column display attributes to default values. |
|
Places a comment which SQL*Plus does not interpret as a command. |
||
Sets the number of blank lines to be printed from the top of each page to the top title. |
||
Use the SQL*Plus SAVE, GET, @ and START commands to create and use external files. |
||
none |
Obsolete |
|
none |
Obsolete |
|
none |
Obsolete |
|
Sets the character used to prefix substitution variables. |
||
Sets the text to be printed between SELECTed columns. |
||
Controls whether SQL*Plus truncates a SELECTed row if it is too long for the current line width. |
||
none |
Obsolete |
|
Places and formats a title at the top of each report page or lists the current TTITLE definition. |
Displays a title at the bottom of each report page.
BTI[TLE] text
The old form of BTITLE offers formatting features more limited than those of the new form, but provides compatibility with UFI (a predecessor of SQL*Plus). The old form defines the bottom title as an empty line followed by a line with centered text. Refer to TTITLE (old form) in this appendix for more details.
Resets the display attributes for a given column to default values.
COL[UMN] {column|expr} DEF[AULT]
Has the same effect as COLUMN CLEAR.
Begins a block of documentation in a script.
DOC[UMENT]
For information on the current method of inserting comments in a script, refer to the section "Placing Comments in Scripts" and to the REMARK command.
After you type DOCUMENT and enter [Return], SQL*Plus displays the prompt DOC> in place of SQL> until you end the documentation. The "pound" character (#) on a line by itself ends the documentation.
If you have set DOCUMENT to OFF, SQL*Plus suppresses the display of the block of documentation created by the DOCUMENT command. (See "SET DOCUMENT" later in this appendix.)
Advances spooled output n lines beyond the beginning of the next page.
NEWPAGE [1|n]
Refer to the NEWPAGE variable of the SET command for information on the current method for advancing spooled output.
Makes the specified buffer the current buffer.
SET BUF[FER] {buffer|SQL}
Initially, the SQL buffer is the current buffer. SQL*Plus does not require the use of multiple buffers; the SQL buffer alone should meet your needs.
If the buffer name you enter does not already exist, SET BUFFER defines (creates and names) the buffer. SQL*Plus deletes the buffer and its contents when you exit SQL*Plus.
Running a query automatically makes the SQL buffer the current buffer. To copy text from one buffer to another, use the GET and SAVE commands. To clear text from the current buffer, use CLEAR BUFFER. To clear text from the SQL buffer while using a different buffer, use CLEAR SQL.
Sets the cursor usage behavior.
SET CLOSECUR[SOR] {ON|OFF}
On or OFF sets whether or not the cursor will close and reopen after each SQL statement. This feature may be useful in some circumstances to release resources in the database server.
Displays or suppresses blocks of documentation created by the DOCUMENT command.
SET DOC[UMENT] {ON|OFF}
SET DOCUMENT ON causes blocks of documentation to be echoed to the screen. Set DOCUMENT OFF suppresses the display of blocks of documentation.
See DOCUMENT in this appendix for information on the DOCUMENT command.
Sets the maximum total row width that SQL*Plus can process.
SET MAXD[ATA] n
In SQL*Plus, the maximum row width is now unlimited. Any values you set using SET MAXDATA are ignored by SQL*Plus.
Controls scanning for the presence of substitution variables and parameters. OFF suppresses processing of substitution variables and parameters; ON allows normal processing.
SET SCAN {ON|OFF}
ON functions in the same manner as SET DEFINE ON.
Sets the number of spaces between columns in output. The maximum value of n is 10.
SET SPACE {1|n}
The SET SPACE 0 and SET COLSEP " commands have the same effect. This command is obsoleted by SET COLSEP, but you can still use it for backward compatibility. You may prefer to use COLSEP because the SHOW command recognizes COLSEP and does not recognize SPACE.
Controls whether SQL*Plus truncates or wraps a data item that is too long for the current line width.
SET TRU[NCATE] {ON|OFF}
ON functions in the same manner as SET WRAP OFF, and vice versa. You may prefer to use WRAP because the SHOW command recognizes WRAP and does not recognize TRUNCATE.
Shows the security level for the current session.
SHO[W] LABEL
Displays a title at the top of each report page.
TTI[TLE] text
The old form of TTITLE offers formatting features more limited than those of the new form, but provides compatibility with UFI (a predecessor of SQL*Plus). The old form defines the top title as a line with the date left-aligned and the page number right-aligned, followed by a line with centered text and then a blank line.
The text you enter defines the title TTITLE will display.
SQL*Plus centers text based on the size of a line as determined by SET LINESIZE. A separator character (|) begins a new line; two line separator characters in a row (||) insert a blank line. You can change the line separator character with SET HEADSEP.
You can control the formatting of page numbers in the old forms of TTITLE and BTITLE by defining a variable named "_page". The default value of _page is the formatting string "page &P4". To alter the format, you can DEFINE _page with a new formatting string as follows:
SET ESCAPE / SQL> DEFINE _page = 'Page /&P2'
This formatting string will print the word "page" with an initial capital letter and format the page number to a width of two. You can substitute any text for "page" and any number for the width. You must set escape so that SQL*Plus does not interpret the ampersand (&) as a substitution variable. See the ESCAPE variable of the SET command for more information on setting the escape character.
SQL*Plus interprets TTITLE in the old form if a valid new-form clause does not immediately follow the command name.
If you want to use CENTER with TTITLE and put more than one word on a line, you should use the new form of TTITLE. For more information see the TTITLE command.
To use the old form of TTITLE to set a top title with a left-aligned date and right-aligned page number on one line followed by SALES DEPARTMENT on the next line and PERSONNEL REPORT on a third line, enter
TTITLE 'SALES DEPARTMENT|PERSONNEL REPORT'
|
Copyright © 1996, 2002 Oracle Corporation. All Rights Reserved. |
|