SQL*Plus User's Guide and Reference
Release 8.1.7

Part Number A82950-01

Library

Product

Contents

Index

Go to previous page Go to next page

F
Obsolete SQL*Plus Commands

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.

SQL*Plus Obsolete Command Alternatives

Obsolete
Command
 
Alternative
Command
 
Description of Alternative Command 
BTITLE (old form)
 
BTITLE
 

Places and formats a title at the bottom of each report page or lists the current BTITLE definition. 

COLUMN DEFAULT
 
COLUMN CLE[AR]
 

Resets column display attributes to default values.  

DOCUMENT
 
REMARK
 

Places a comment which SQL*Plus does not interpret as a command.  

NEWPAGE
 
SET NEWP[AGE] {1|n|NONE}
 

Sets the number of blank lines to be printed from the top of each page to the top title. 

SET BUFFER
 
EDIT
 

Use the SQL*Plus SAVE, GET, @ and START commands to create and use external files.  

SET CLOSECURSOR
 
none
 

Obsolete 

SET DOCUMENT
 
none
 

Obsolete 

SET MAXDATA
 
none
 

Obsolete 

SET SCAN
 
SET DEF[INE] {&|c|ON|OFF}
 

Sets the character used to prefix substitution variables.  

SET SPACE
 
SET COLSEP {_|text}
 

Sets the text to be printed between SELECTed columns.  

SET TRUNCATE
 
SET WRA[P] {ON|OFF}
 

Controls whether SQL*Plus truncates a SELECTed row if it is too long for the current line width.  

SHOW LABEL
 
none
 

Obsolete 

TTITLE (old form)
 
TTITLE
 

Places and formats a title at the top of each report page or lists the current TTITLE definition.  

BTITLE (old form)

Purpose

Displays a title at the bottom of each report page.

Syntax

BTI[TLE] text

Usage Notes

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.

COLUMN DEFAULT

Purpose

Resets the display attributes for a given column to default values.

Syntax

COL[UMN] {column|expr} DEF[AULT]

Usage Notes

Has the same effect as COLUMN CLEAR.

DOCUMENT

Purpose

Begins a block of documentation in a command file.

Syntax

DOC[UMENT]

Usage Notes

For information on the current method of inserting comments in a command file, refer to the section "Placing Comments in Command Files"under "Saving Commands for Later Use" in Chapter 3 and to the REMARK command in the "Command Reference" in Chapter 8.

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.)

NEWPAGE

Purpose

Advances spooled output n lines beyond the beginning of the next page.

Syntax

NEWPAGE [1|n]

Usage Notes

Refer to the NEWPAGE variable of the SET command in Chapter 8 for information on the current method for advancing spooled output.

SET BUFFER

Purpose

Makes the specified buffer the current buffer.

Syntax

SET BUF[FER] {buffer|SQL}

Usage Notes

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.

SET CLOSECURSOR

Purpose

Sets the cursor usage behavior.

Syntax

SET CLOSECUR[SOR] {ON|OFF}

Usage Notes

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.

SET DOCUMENT

Purpose

Displays or suppresses blocks of documentation created by the DOCUMENT command.

Syntax

SET DOC[UMENT] {ON|OFF}

Usage Notes

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.

SET MAXDATA

Purpose

Sets the maximum total row width that SQL*Plus can process.

Syntax

SET MAXD[ATA] n

Usage Notes

In SQL*Plus, the maximum row width is unlimited. Any values you set using SET MAXDATA are ignored by SQL*Plus.

SET SCAN

Purpose

Controls scanning for the presence of substitution variables and parameters. OFF suppresses processing of substitution variables and parameters; ON allows normal processing.

Syntax

SET SCAN {ON|OFF}

Usage Notes

ON functions in the same manner as SET DEFINE ON.

SET SPACE

Purpose

Sets the number of spaces between columns in output. The maximum value of n is 10.

Syntax

SET SPACE {1|n}

Usage Notes

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.

SET TRUNCATE

Purpose

Controls whether SQL*Plus truncates or wraps a data item that is too long for the current line width.

Syntax

SET TRU[NCATE] {ON|OFF}

Usage Notes

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.

SHOW LABEL

Purpose

Shows the security level for the current session.

Syntax

SHO[W] LABEL

TTITLE (old form)

Purpose

Displays a title at the top of each report page.

Syntax

TTI[TLE] text

Usage Notes

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:

SQL> 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 in Chapter 8 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 in Chapter 8.

Example

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

SQL> TTITLE 'SALES DEPARTMENT|PERSONNEL REPORT'

Go to previous page Go to next page
Oracle
Copyright © 1996-2000, Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index