Sql*Plus User’s Guide and Reference


Download 5.34 Mb.
Pdf ko'rish
bet62/103
Sana04.08.2023
Hajmi5.34 Mb.
#1665146
1   ...   58   59   60   61   62   63   64   65   ...   103
Bog'liq
E18404-12

5-7
Deleting Lines 
Use the DEL command to delete lines in the buffer. Enter DEL specifying the line 
numbers you want to delete. 
Suppose you want to delete the current line to the last line inclusive. Use the DEL 
command as shown.
DEL * LAST
DEL makes the following line of the buffer (if any) the current line.
See 
DEL
 on page 12-48 for more information.
Placing Comments in Scripts
You can enter comments in a script in three ways:

using the SQL*Plus REMARK command for single line comments.

using the SQL comment delimiters /*... */ for single or multi line comments.

using ANSI/ISO (American National Standards Institute/International Standards 
Organization) comments -- for single line comments.
Comments entered at the command-line are not stored in the SQL buffer.
Using the REMARK Command
Use the REMARK command on a line by itself in a script, followed by comments on 
the same line. To continue the comments on additional lines, enter additional 
REMARK commands. Do not place a REMARK command between different lines of a 
single SQL command.
REMARK Commission Report;
REMARK to be run monthly.;
COLUMN LAST_NAME HEADING 'LAST_NAME';
COLUMN SALARY HEADING 'MONTHLY SALARY' FORMAT $99,999;
COLUMN COMMISSION_PCT HEADING 'COMMISSION %' FORMAT 90.90;
REMARK Includes only salesmen;
SELECT LAST_NAME, SALARY, COMMISSION_PCT
FROM EMP_DETAILS_VIEW
WHERE JOB_ID='SA_MAN';
Using /*...*/
Enter the SQL comment delimiters, /*...*/, on separate lines in your script, on the 
same line as a SQL command, or on a line in a PL/SQL block. 
You must enter a space after the slash-asterisk(/*) beginning a comment.
The comments can span multiple lines, but cannot be nested within one another:
/* Commission Report
to be run monthly. */
COLUMN LAST_NAME HEADING 'LAST_NAME';
COLUMN SALARY HEADING 'MONTHLY SALARY' FORMAT $99,999;
COLUMN COMMISSION_PCT HEADING 'COMMISSION %' FORMAT 90.90;
REMARK Includes only salesmen;
SELECT LAST_NAME, SALARY, COMMISSION_PCT
FROM EMP_DETAILS_VIEW
/* Include only salesmen.*/
WHERE JOB_ID='SA_MAN'; 


Placing Comments in Scripts

Download 5.34 Mb.

Do'stlaringiz bilan baham:
1   ...   58   59   60   61   62   63   64   65   ...   103




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling